nully / laravelgenerators Goto Github PK
View Code? Open in Web Editor NEWLaravel generator command collection
License: MIT License
Laravel generator command collection
License: MIT License
generate a Service
Class skelton.
example stub file.
<?php
namespace DummyNamespace;
class DummyClass
{
// write your code.
}
add a ValueObject class skelton.
Carbon type is, equals DateTime type.
example sutb file.
<?php
namespace DummyNamespace;
use Carbon\Carbon;
use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;
class DummyClass extends VOAbstract
{
/**
* construct string type ValueObject
*
* @param $value boolean
*/
public function __construct(Carbon $value)
{
$this->value = $value;
$this->approvedOf();
}
/**
* {@inheritDoc}
*/
protected function approvedOf()
{
assert($this->value type Carbon);
}
/**
* Carbon object cast to formatted string.
*
* @param $format string datetime format string
* @return String
*/
public function __toString($format)
{
return $this->value->format($format);
}
public function valueOf($format = 'Y-m-d H:i:s')
{
return $this->__toString($format);
}
// write your code.
}
add a .travis-ci.yml
.
other wise vendor directories.
generate a Repository class skelton.
example stub file.
<?php
namespace DummyNamespace;
use LaravelGenerators\Repositories\RepositoryAbstract;
class DummyClass extends RepositoryAbstract
{
// write your code.
}
add a ValueObject class skelton.
example sutb file.
<?php
namespace DummyNamespace;
use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;
class DummyClass extends VOAbstract
{
/**
* construct string type ValueObject
*
* @param $value boolean
*/
public function __construct(bool $value)
{
$this->value = $value;
$this->approvedOf();
}
/**
* {@inheritDoc}
*/
protected function approvedOf()
{
assert(is_bool($this->value));
}
// write your code.
}
add a Type class skelton.
Type class It is a pseudo Enum class.
example sutb file.
<?php
namespace DummyNamespace;
use Carbon\Carbon;
use LaravelGenerators\Types\EnumAbstract;
class DummyClass extends EnumAbstract
{
// write your code.
}
add a ValueObjectGroup class skelton.
example sutb file.
<?php
namespace DummyNamespace;
use LaravelGenerators\ValueObjects\ValueObjectGroupAbstract as VOG;
class DummyClass extends VOG
{
// write your code.
}
add a ValueObject class skelton.
example sutb file.
<?php
namespace DummyNamespace;
use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;
class DummyClass extends VOAbstract
{
/**
* construct string type ValueObject
*
* @param $value integer
*/
public function __construct(integer $value)
{
$this->value = $value;
$this->approvedOf();
}
/**
* {@inheritDoc}
*/
protected function approvedOf()
{
assert(is_int($this->value));
}
// write your code.
}
add a ValueObject class skelton.
example sutb file.
<?php
namespace DummyNamespace;
use LaravelGenerators\ValueObjects\ValueObjectAbstract as VOAbstract;
class DummyClass extends VOAbstract
{
/**
* construct string type ValueObject
*
* @param $value string
*/
public function __construct(string $value)
{
$this->value = $value;
$this->approvedOf();
}
/**
* {@inheritDoc}
*/
protected function approvedOf()
{
assert(!empty($this->value) && is_string($this->value));
}
// write your code.
}
add a composer.json file for Laravel Generators .
LaravelGenerators is It is a command collection to create a class skeleton called "It is nice."
support is
string
integer
boolean
Carbon
(as DateTime class)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.