User interface to help developpers with laravel-code-generator commands. With this package combined to crestapps/laravel-code-generator, developpers can create easily their CRUD.
You can visite crestapps/laravel-code-generator repository to see how to set it up properly.
To download this package into your laravel project, use the command-line to execute the following command
composer require pilabrem/laravel-code-generator-ui --dev
If don't have a layout, you can create one for your project with this command
php artisan create:layout "Your project name"
(You may skip this step when using Laravel >= 5.5) To bootstrap the packages into your project , open the app/Providers/AppServiceProvider.php file in your project. Then, add the following code to the register() method.
Add the following line to bootstrap laravel-code-generator to the framework.
$this->app->register('CrestApps\CodeGenerator\CodeGeneratorServiceProvider');
$this->app->register('Pilabrem\CodeGeneratorUI\CodeGeneratorUiServiceProvider');
Publish the package assets
php artisan vendor:publish --provider="Pilabrem\CodeGeneratorUI\CodeGeneratorUiServiceProvider"
Now, you can migrate database
php artisan migrate
Manage tables models
To manage your tables models, access to yourHost/code-generator-ui/table.
After visiting the link, you can click on the plus and green button at the top to add a table model. In this form, you should fill:
Model name
Use Camel Case for Model Name
Table name (optional)
Use Snake Case for table name
Translations (optional)
Exemples: en,fr
Manage tables models attributes
To manage tables models attributes, you must click on the view details button corresponding to the table model. After that, you will see all attributes of the table model. To add one, click on the plus and green button.
Attribute properties:
Enter attribute laravel validation (optional)
Example: required
Enter attribute Data Type Params (optional)
Examples:
Enter attribute Options for select, radio, checkbox, ... (optional)
Example: Male|Female
Enter attribute Date format (optional)
Example: Y-m-d
PS: It's not allowed to use one of the following symbols in input:
; : ,