Download the PHP package aliqsyed/scaffolder without Composer
On this page you can find all versions of the php package aliqsyed/scaffolder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aliqsyed/scaffolder
More information about aliqsyed/scaffolder
Files in aliqsyed/scaffolder
Package scaffolder
Short Description Scaffold Controllers, Models, Factories, Policies, Requests and front-end blade files for Laravel
License MIT
Homepage https://github.com/aliqsyed/scaffolder
Informations about the package scaffolder
Scaffolder
About Scaffolder
This Laravel package scaffolds Controllers, Models, Factories, Policies, Requests and front end blade files for forms (both edit and delete), show and index views.
This package generates code. Please make sure you read the generated code and make any corrections necessary.
Compatiblity
This package works with Laravel 6.0 and above.
Installation
Via Composer
This will add the scaffolder artisan commands to your project.
Usage
You need to create and run a migration for a table. This is a mandatory step since the scoffolds for items listed above are based on the table structure.
Let's say you have created a table called posts
. You can create various classes/files as follows:
or you can generate all the scaffolds available at once by running the following command:
All the classes and views generated are copied to their standard Laravel locations.
Command options
--force
Use this option to overwrite an existing file.
--nostubs
Use this option to use the stubs that come with the package instead of the onces published. See information below on publishing stubs.
Additional command options for models only
If you are generating models, you can use these additional options.
--nosetters
If you use this option, the model will be created without any setters. By default there are setters for date fields.
--nocasts
If you use this option, the model will be created without any casts. By default there are casts for date fields.
Customizing the code being generated
Use the tag scaffolder.stubs
to publish stubs.
The publishes the stubs for scaffolder to resources/vendor/aliqsyed/stubs
folder.
Once the stubs are published, you can edit them in any way you want. Please do not delete any individual files in the stubs folder.
You can delete the resources/vendor/aliqsyed/stubs
directory, and the package will go back to using the default stubs that come with the package.
License
MIT. Please see the license file for more information.