Skip to content

Commit 0340961

Browse files
authored
Update README.md
1 parent 9f53fd8 commit 0340961

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
![StyleCI](https://img.shields.io/badge/StyleCI-pass-green.svg?style=flat-square)
77

88

9-
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`, and `livewire`. (Livewire views will be generated in **Tailwind** css)
9+
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.
1010

1111
- Will create **Model** with Eloquent relations
1212
- Will create **Controller** with all resources
13+
- Will create **API Controllers** with all requests
1314
- Will create **Component** with all resources for Livewire
1415
- Will create **views** in Bootstrap/Tailwind
1516

@@ -54,22 +55,32 @@ Route::get('/banks/create', \App\Livewire\Banks\Create::class)->name('banks.crea
5455
Route::get('/banks/show/{bank}', \App\Livewire\Banks\Show::class)->name('banks.show');
5556
Route::get('/banks/update/{bank}', \App\Livewire\Banks\Edit::class)->name('banks.edit');
5657
```
58+
59+
For `api` add routes below
60+
```
61+
Route::apiResource('banks', BankController::class);
62+
```
63+
5764
Route name in plural slug case.
5865

5966
#### Options
6067
- Tech Stack
68+
69+
<img width="535" alt="image" src="https://github.com/awais-vteams/laravel-crud-generator/assets/10154558/c1e2e2a6-7fcd-4c4a-a393-56d8fe6eb231">
6170
```
62-
php artisan make:crud {table_name} --stack={bootstrap,tailwind,livewire}
71+
php artisan make:crud {table_name} --stack={bootstrap,tailwind,livewire,api}
6372
6473
php artisan make:crud banks --stack=bootstrap //This will create views in Bootstrap 5 using Blade
6574
php artisan make:crud banks --stack=tailwind //This will create views in Tailwind css using Blade
6675
php artisan make:crud banks --stack=livewire //This will create views in Tailwind css with Livewire components
76+
php artisan make:crud banks --stack=api //This will create API only controllers
6777
```
6878
- Custom Route
6979
```
7080
php artisan make:crud {table_name} --route={route_name}
7181
```
7282

83+
7384
## Examples
7485

7586
*Model*
@@ -82,6 +93,10 @@ php artisan make:crud {table_name} --route={route_name}
8293
*Livewire component*
8394
<img width="100%" alt="image" src="https://github.com/awais-vteams/laravel-crud-generator/assets/10154558/e4c3bca5-f27a-41a8-a5bd-00c51b156235">
8495

96+
*API only controller*
97+
98+
<img width="500" alt="image" src="https://github.com/awais-vteams/laravel-crud-generator/assets/10154558/a42329a8-58e7-49ef-8e21-b6227555542b">
99+
85100

86101
*Tailwind CSS*
87102
<img width="100%" alt="image" src="https://github.com/awais-vteams/laravel-crud-generator/assets/10154558/b5ca686a-5a3b-4c60-849c-e757d16dc1a0">

0 commit comments

Comments
 (0)