Download the PHP package bgaze/laravel-crud without Composer
On this page you can find all versions of the php package bgaze/laravel-crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-crud
Laravel CRUD Generator
Table of content
The Conventions section explain very important concepts.
Please read it carrefully before using this package.
- Overview
- Installation
- Why this package?
- Conventions
Documentation:
- Usage
- CRUD command options
- Custom CRUD theme
Overview
This package allows to generate CRUDs in a breath for your Laravel 5.5+ applications.
Please have a look to this short video on Vimeo to see it in action.
Using the SignedInput syntax, it offers a concise and handy way to define the model fields.
It is designed to create easily custom CRUDs, aka themes.
Two simple themes are provided :
- crud:classic generates a fully fonctionnal "classic" CRUD.
It creates for you : migration, model, factory, seeder, request, resource, controller, blade views and routes. - crud:api generates a fully fonctionnal REST API CRUD.
It creates for you : migration, model, factory, seeder, request, resource, controller and routes.
Installation
Simply import the package as a dev dependency into your Laravel application:
You can publish the package configuration to /config/crud.php
:
And classic themes views to /resources/views/vendor/crud-classic
:
Why this package?
Laravel is my favorite PHP framework.
But using it daily, at work and for my private projects, I realized that each time I create a model,
I was wasting a lot of time doing repetitive tasks instead of really working on the application itself:
- Generate classes: model, migration, controller, request, factory, seeder, ...
- Define the table fields into migration.
- Create the rules into the request class.
- Create the model faker into factory.
- Define CRUD actions into controller.
- Register controller routes.
- Create CRUD views and model forms.
I believe that this process can be automated a lot to produce a generic functionnal CRUD that we just need to customize, keeping the focus on the application logic.
The key for that is to define the Model table fields from whom, sticking to the framework conventions, a lot of things can be deducted.
For instance request rules or form fields: a non-nullable field is required, an enum field is often a select.
But even if CRUD generation logic will be almost the same, the files to generate can vary a lot depending on the tools used.
For instance, using classic HTML or Vue.js, a CRUD files will be very different.
So this package goals are to provide:
- A handy way to define required informations for a CRUD generation.
- An extensible base to create easily custom CRUD generators (named themes).
- Two simple themes to use as base for custom CRUDs:
- A REST API CRUD.
- A standart CRUD using Blade templates.
Conventions
CRUD generator need to manipulate Model name in order to generate required ressources.
As a convention, we designate by:
- FullName: the model's name including namespace without the
App
part. - Plural: the FullName with last segment pluralized.
- Plurals: the FullName with each segments pluralized.
Examples:
All versions of laravel-crud with dependencies
laravelcollective/html Version >=5.5.4
bgaze/laravel-php-cs-fixer Version ~1
tightenco/ziggy Version ~0.6