Download the PHP package phpjuice/blueprint without Composer
On this page you can find all versions of the php package phpjuice/blueprint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpjuice/blueprint
More information about phpjuice/blueprint
Files in phpjuice/blueprint
Package blueprint
Short Description Blueprint is a powerful CRUD generator to speed up the development of your laravel apps.
License MIT
Homepage https://github.com/phpjuice/blueprint
Informations about the package blueprint
Blueprint
Blueprint is a powerful CRUD generator to speed up the development of your laravel apps.
Installation
Blueprint Package requires Laravel 5.5 or higher.
INFO: If you are using an older version of Laravel this package may not function correctly.
The supported way of installing Blueprint package is via Composer.
This package supports Package Auto Discovery feature on Laravel
5.5 or higher the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php
file:
After that, you can publish its Template Files using the vendor:publish Artisan command:
You can publish the Configuration file with:
When published, the config/blueprint.php
config file contains:
Usage
Blueprint crud generator is designed to be very simple and straightforward to use. All you need to do is to create a crud blueprint file then generate it.
Creating a CRUD
Inorder to create a blueprint file we use the following artisan command :
Example:
After running this command a crud blueprint file will be generated under your database folder database/blueprints
, the naming convention will follow laravel migrations naming conventions. ex: 2018_12_09_144004_create_post_crud_blueprint.json
And here is a basic strucure for a blueprint json file,following laravel's naming conventions the crud will generate resource names from the CRUD_NAME
arguement passed to php artisan blueprint:make
command.
Example:
Generating a CRUD
Inorder to generate the crud we created we use the following command :
Example:
Note: note that we are using the crud name not the curd file name, this command will try to look for a crud blueprint under your
database/blueprints
folder with the provided name, if none is found it will ask you to create a new crud under that name.
After running this command a the following files will be generated :
- Controller
- Model
- Request
- Response
- Migration
- Test
And by default, the generator will attempt to append the crud route to your Route file. following this snippet
Route::apiResource('route-name', 'controller-name');
Runing Crud Migrations
After generating the curd and creating all resources, run migrate command:
CRUD Blueprint Example
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details.
Security
If you discover any security related issues, please email author instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.