dev-master
9999999-devLaravel 5.6 scaffolding generator
MIT
The Requires
The Development Requires
by John Elliott
laravel crud yaml scaffolding
Laravel 5.6 scaffolding generator
Laravel Maker is a tool to kick start project development and help with prototyping by creating scaffolding from YAML based definitions., (*1)
There are some amazing and highly complex CRUD and Admin resource_types but the aim of this is to create an opinionated scaffolding builder without many options but that is easy to hack and modify., (*2)
The package is designed to read from a yaml file (or files) that define the migrations, class names, labels etc., (*3)
The package is also capable of reading from an existing database table to so that crud can be created for that., (*4)
Laravel 5.5+, (*5)
This package reads a yaml file and then creates the following resources:, (*6)
The yaml files are defined in /database/models, (*7)
Contains the Artisan commands, (*8)
This directory mirrors the structure of Laravel and is setup to use Request and Repository classes., (*9)
These files will processed and placeholders replaced in order to generate the scaffolding files., (*10)
Stubs can be overloaded on a individual basis based on a path defined in config, (*11)
This also mirrors the structure of Laravel., (*12)
e.g. BaseController, BaseModel, (*13)
These files will be published as is., (*14)
__MODEL.NAME__
The name of the model class e.g. Post, (*15)
__VIEW.RESOURCE.DIRECTORY__
e.g. posts, (*16)
__VIEW.NAMESPACE.DIRECTORY__
e.g. admin, (*17)
__ROUTE.PATH__
The Admin route in dot format e.g. posts, (*18)
__ROUTE.AS__
The route prefix defined as 'as' in the route group variable e.g. admin, (*19)
__MODEL.NAME.HUMAN__
The singular friendly name of the model e.g. post, (*20)
__MODEL.NAME.HUMAN.PLURAL__
The plural friendly name of the model e.g. posts, (*21)
__MODEL.VAR.NAME__
The singular variable name of the model e.g. post, (*22)
__MODEL.VAR.NAME.PLURAL__
The plural variable name of the model e.g. posts, (*23)
Setup a Laravel site as normal..., (*24)
laravel new t6.example.com
, (*25)
php artisan key:generate
, (*26)
Edit .env
, (*27)
php artisan migrate
, (*28)
php artisan make:auth
, (*29)
Create and cd into /packages/AbCreative
directory, (*30)
git clone https://github.com/ab-creative/laravel-maker.git
, (*31)
Edit /composer.json to add the package:, (*32)
"autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/", "AbCreative\\LaravelMaker\\": "packages/AbCreative/laravel-maker/src" } },
config/app.php
providers:/* * Package Service Providers... */ AbCreative\LaravelMaker\LaravelMakerServiceProvider::class,
Copy the test example.yaml definition from stubs/database/definitions/
into the main laravel /database/definitions/
, (*33)
Install the composer dependencies from the package in root e.g., (*34)
composer require symfony/yaml --dev
, (*35)
composer require laracasts/generators --dev
, (*36)
composer require laravelcollective/html
, (*37)
cd into /packages/abcreative/laravel-maker/
directory, (*38)
run `../../../vendor/bin/phpuni, (*39)
Use the generator via artisan e.g. php artisan build:command
, (*40)
file
is a yaml file defined in /database/definitions/
, (*41)
tables
a comma separated list of tables, (*42)
--clean
will delete an existing file, (*43)
--force
will overwrite an existing file, (*44)
build:clean file
Delete all the files generated by the package, (*45)
build:controller file --force --clean
Create a new controller, (*46)
build:crud file --force --clean
Create a new model, controllers, routes, views and migration, (*47)
build:migration file --force --clean
Create a new set of migrations, (*48)
build:model file --force --clean
Create a new model, (*49)
build:request file --force --clean
Create a new set of request classes, (*50)
build:route file --force --clean
Create a new route, (*51)
build:view file --force --clean
Create a new set of view files, (*52)
build:yaml tables --force --clean
Create Yaml from one or more database tables, (*53)
This package has been developed by AB Multimedia Ltd, (*54)
Copyright (c) 2018 AB Multimedia Ltd, (*55)
For the full copyright and license information, please view the LICENSE file that was distributed with this source code., (*56)
This package is open-sourced software licensed under the MIT license., (*57)
Laravel 5.6 scaffolding generator
MIT
laravel crud yaml scaffolding