infinito / laravel-crud-api-generator
Crud generator by laravel
1.0
2024-03-18 16:13 UTC
Requires
- php: >=8.0
README
For new project.
URL Package List:
1.- Install package:
For prod: composer require infinito/laravel-crud-api-generator For dev: composer require infinito/laravel-crud-api-generator:dev-main For remove: composer remove infinito/laravel-crud-api-generator
2.-Excute
php artisan make:controller Dev/TestController
3.- Add Dev/TestController add web.php:
... use Infinito\LaravelCrudApiGenerator\Scripts; ... class TestController { public function __invoke(){ (new Scripts())->__invoke(); echo "Done!"; } }
4.- Add web.php:
Route::get('/test', [\App\Http\Controllers\Dev\TestController::class, '__invoke'])->name('test');
5.- Add inside "app\Http\Middleware\VerifyCsrfToken" exception "VerifyCsrfToken.php"
... protected $except = [ 'generator/*', // <---- This Line ... ]; ...
6.- Add first time Postman or request get by URl
http://127.0.0.1:8090/test
7.- Then see form
http://127.0.0.1:8090/generator
Folder structure
- Controller - Models - Repositories
Nota: Para nueva version, creae una "tag" y volver a subir la version
git tag -d 1.0 Para agregar por el PhpStorm. Borrar del github el tag.