https://github.com/awais-vteams/laravel-crud-generator
Laravel CRUD Generator
https://github.com/awais-vteams/laravel-crud-generator
bootstrap console crud-generator eloquent-relations generator laravel laravel-5-package laravel-crud-generator laravel-package laravel-packages model-generator php
Last synced: 22 days ago
JSON representation
Laravel CRUD Generator
- Host: GitHub
- URL: https://github.com/awais-vteams/laravel-crud-generator
- Owner: awais-vteams
- License: mit
- Created: 2018-12-17T13:23:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-06T07:22:24.000Z (30 days ago)
- Last Synced: 2025-05-06T08:34:08.536Z (30 days ago)
- Topics: bootstrap, console, crud-generator, eloquent-relations, generator, laravel, laravel-5-package, laravel-crud-generator, laravel-package, laravel-packages, model-generator, php
- Language: PHP
- Homepage: https://packagist.org/packages/ibex/crud-generator
- Size: 197 KB
- Stars: 663
- Watchers: 23
- Forks: 141
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README



This Laravel CRUD Generator v2.x package provides and generates Controller, Model (with eloquent relations), and Views in **Bootstrap**/**Tailwind CSS** for the development of your applications with a single command. This new `v2.x` will have stack options like `bootstrap`, `tailwind`, `livewire`(Livewire views will be generated in **Tailwind** CSS), and `API` only.
- Will create **Model** with Eloquent relations
- Will create **Controller** with all resources
- Will create **API Controllers** with all requests
- Will create **Component** with all resources for Livewire
- Will create **views** in Bootstrap/TailwindThis is the best crud generator for a blank Laravel project installation too. This will auto install the starter kit [laravel/breeze](https://github.com/laravel/breeze) or [laravel/ui](https://github.com/laravel/ui) (for bootstrap 5) for blank Laravel installation.
## Requirements
Laravel >= 10.x
PHP >= 8.1## Installation
1 - Install
```
composer require ibex/crud-generator --dev
```
2- Publish the default package's config (optional)
```
php artisan vendor:publish --tag=crud
```**For older Laravel(<10.x) versions please use [v1.x](https://github.com/awais-vteams/laravel-crud-generator/tree/v1.6)**
```
composer require ibex/crud-generator:1.6 --dev
```## Usage
```
php artisan make:crud {table_name}php artisan make:crud banks
```Add a route in `web.php`
```
Route::resource('banks', BankController::class);
```For `Livewire` add routes below
```
Route::get('/banks', \App\Livewire\Banks\Index::class)->name('banks.index');
Route::get('/banks/create', \App\Livewire\Banks\Create::class)->name('banks.create');
Route::get('/banks/show/{bank}', \App\Livewire\Banks\Show::class)->name('banks.show');
Route::get('/banks/update/{bank}', \App\Livewire\Banks\Edit::class)->name('banks.edit');
```For `api` add routes below
```
Route::apiResource('banks', BankController::class);
```Route name in plural slug case.
#### Options
- Tech Stack
![]()
```
php artisan make:crud {table_name} {bootstrap,tailwind,livewire,api}php artisan make:crud banks bootstrap //This will create views in Bootstrap 5 using Blade
php artisan make:crud banks tailwind //This will create views in Tailwind css using Blade
php artisan make:crud banks livewire //This will create views in Tailwind css with Livewire components
php artisan make:crud banks api //This will create API only controllers
```
- Custom Route
```
php artisan make:crud {table_name} --route={route_name}
```## Examples
*Model*
*Controller*
*Livewire component*
*API only controller*
*Tailwind CSS*
*Bootstrap*
*Tailwind Form*
*Bootstrap Form*
## Personalize
You have the possibility of 100% customizing the generated views, this is achieved in the following way:- Run this command `php artisan vendor:publish --tag=crud` this will create the `crud.php` file in your config/ folder.
- Update the variable `stub_path`, to your own stub folder like `'stub_path' => resource_path('stubs/'),`
- Copy the stubs files from package
```
php artisan vendor:publish --tag=stubs-crud
```
- Update your changes in your stub files. (you can delete extra files/folders if you are not using them).
- Run the command for crud generation and you'll get the updated views.## Author
M Awais // [Email Me](mailto:[email protected])
Hire Me [LinkedIn](https://www.linkedin.com/in/asargodha/)
[Buy me a Coffee](https://ko-fi.com/C0C8VT1M)
[](https://ko-fi.com/C0C8VT1M)