Description
Laravel Auto CRUD Generator is a package that simplifies CRUD (Create, Read, Update, Delete) operations for your Laravel application. With a single command, you can generate all necessary files and logic for a selected model, reducing development time and effort.
To generate CRUD operations for a model, use the following Artisan command:
php artisan auto-crud:generate -h
Description: A command to create auto CRUD for your models. Usage: auto-crud:generate [options] Options: -A, --all Force generate all possible files without overwrite option. -M, --model[=MODEL] Select one or more of your models. (multiple values allowed) -T, --type[=TYPE] Select api, web or both. (multiple values allowed) -R, --repository Working with repository design pattern. -O, --overwrite Overwrite the files if already exists. -P, --pattern[=PATTERN] Supports Spatie-Data Pattern. [default: "normal"] -C, --curl Generate CURL Requests for API. -S, --swagger-api Generate Swagger API json for API. -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under -FA, --force-all Force generate all possible files with overwrite option. -MP, --model-path[=MODEL-PATH] Set models path. -PM, --postman Generate Postman Collection for API. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example:
php artisan auto-crud:generate --model-path=app/AnotherModels --model=User --model=Manager --overwrite --type=api --repository --pattern=spatie-data --curl --postman

Recent Courses on Laravel Daily
Testing in Laravel 13 For Beginners
26 lessons
1 h 41 min read
How to Build Laravel 13 API From Scratch
30 lessons
1 h 23 min
How to Structure Laravel 13 Projects
16 lessons
1 h 32 min read