Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Crudify Laravel Package

mr.incognito/crudify

Laravel CRUD generator for API or web apps. One Artisan command scaffolds models, migrations, controllers, form requests, API resources, routes, and optional Blade views. Supports validation rules, nullable fields, foreign keys/constraints, defaults, excludes, and delete:crud cleanup.

View on GitHub
Deep Wiki
Context7

This package helps to create complete operation of crud with a simple artisan command.

Frequently asked questions about Crudify
How do I generate a Laravel API CRUD for a model with foreign key constraints?
Use the `make:crud` command with `--fields` specifying the foreign key and constraints. For example: `php artisan make:crud Department --fields="name:string|max:255;created_by:foreign|constrained:users|onDelete:cascade"`. This generates a model, migration, controller, and API resource with the foreign key relationship and cascade delete logic.
Can I exclude certain files (e.g., Blade views) when generating a CRUD?
Yes, use the `--exclude` flag to skip specific files. For example, `php artisan make:crud Article --fields="title:string" --exclude=views` will generate everything except Blade views. You can exclude multiple files by comma-separating them (e.g., `--exclude=model,views`).
Does this package work with Laravel 10 and newer versions?
Yes, `mr.incognito/crudify` is designed for modern Laravel versions (9.x and 10.x). It leverages Laravel’s core components like Eloquent, Migrations, and API Resources, ensuring compatibility. Always check the package’s GitHub repo for the latest Laravel version support before installing.
How do I add default values or nullable fields to a generated CRUD?
Use the `--fields` syntax with `~` for nullable fields and `|default:value` for defaults. For example: `php artisan make:crud Product --fields="name:string~|default:Unnamed;price:decimal|default:0.00"`. This will generate nullable `name` and a `price` field with a default value of `0.00`.
What if I need to customize the generated controller or request logic?
After generation, manually edit the generated files in `app/Http/Controllers/` or `app/Http/Requests/`. The package provides sensible defaults, but you can override methods like `store()`, `update()`, or validation rules in the `FormRequest` class. Use `--exclude=controller` if you prefer to write your own from scratch.
Is there a way to clean up or remove all generated CRUD files?
Yes, the package includes a `delete:crud` command. Run `php artisan delete:crud ModelName` (e.g., `php artisan delete:crud Department`) to remove all files generated for that CRUD, including models, migrations, controllers, and views. This is useful for testing or resetting generated code.
Will this package work with non-Blade frontend frameworks like Livewire or Inertia.js?
For API CRUDs (`--type=api`), it works seamlessly with Livewire, Inertia.js, or Vue/React. For web CRUDs (`--type=web`), Blade views are generated by default, which may not integrate directly. Use `--exclude=views` and manually link to your custom frontend templates or components.
How do I generate a CRUD for an existing table with data?
Avoid generating migrations for existing tables to prevent conflicts. Use `--exclude=migration` and manually create the migration if needed. The package generates models, controllers, and requests safely, but you’ll need to handle schema changes (e.g., adding columns) separately.
Are the generated validation rules type-safe and customizable?
Yes, the package generates type-aware validation rules (e.g., `string|max:255`, `integer|min:0`) based on your `--fields` input. To customize, extend the generated `FormRequest` class (e.g., add `unique:except,$id` rules) or override validation logic in the controller. The rules align with Laravel’s validation system.
What are some alternatives to mr.incognito/crudify for Laravel CRUD generation?
Alternatives include `laravel-shift/crud-generator` (more opinionated), `spatie/laravel-model-generator` (simpler, model-focused), and `orchid/software` (admin panel with CRUD). Unlike these, `mr.incognito/crudify` emphasizes modularity (exclude files), dual API/web support, and cleanup commands. Choose based on whether you need Blade views, API-first, or admin panel integration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky