[] (https://travis-ci.org/ernestova/laranerators.svg)
Laravel 5 model generator for an existing MySql schema.
It reads your existing database schema and generates model class files based on the existing tables.
Add "ernestovargas/laranerators": "dev-master"
to your require-dev section on your composer.json file.
Because the generators are only useful for development, add the provider in app/Providers/AppServiceProvider.php, like:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('ErnestoVargas\Generators\GeneratorsProvider');
}
}
php artisan help make:models
Options:
- --dir="" Model directory (default: "Models/")
- --extends="" Parent class (default: "Model")
- --fillable="" Rules for $fillable array columns (default: "")
- --guarded="" Rules for $guarded array columns (default: "ends:_id|ids,equals:id")
- --timestamps="" Rules for $timestamps columns (default: "ends:_at")
- --ignore=""|-i="" A table names to ignore
- --ignoresystem|-s List of system tables (auth, migrations, entrust package)