Download the PHP package mr.incognito/crudify without Composer
On this page you can find all versions of the php package mr.incognito/crudify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mr.incognito/crudify
More information about mr.incognito/crudify
Files in mr.incognito/crudify
Package crudify
Short Description This package is for handling the crud for simple crud like for setup etc.
License MIT
Informations about the package crudify
Laravel API CRUD Generator
A Laravel package to quickly scaffold API-based CRUD operations using a simple artisan command. Generates Models, Migrations, Form Requests, API Resources, and Controllers with proper validation rules and fillable fields — with support for foreign keys, nullable fields, and default values.
Installation
To install the package, run:
✨ Features
- ✅ Generates Model, Migration, Controller, Request, and Resource
- ✅ Handles nullable fields (using
~
as a suffix) - ✅ Supports foreign key constraints
- ✅ Adds default values to migration fields
- ✅ Type-aware validation rules (e.g.,
string
,integer
,boolean
) - ✅ Artisan-based generation: fast and developer-friendly
- ✅ Built-in Pest tests
🚀 Usage
Example 1:
To create crud without foreignKey
Example 2:
To create crud with required foreignKey column and with constrained
Example 3:
To create crud with nullable foreignKey column
Example 4:
To create crud with default value column
These all will Generate
-
app/Models/Department.php
-
app/Http/Controllers/DepartmentController.php
-
app/Http/Requests/DepartmentRequest.php
-
app/Http/Resources/DepartmentResource.php
-
database/migrations/xxxx_xx_xx_create_departments_table.php
- Adds route in routes/api.php
Field Syntax
Each field uses the format:
Supported Field Types
You can use any of the following Laravel migration column types:
string, text, boolean, integer, decimal, date, uuid, json, timestamp, etc.
Foreign key via foreign, e.g., user_id:foreign~|constrained:users
Nullable fields: suffix type with ~
, e.g., email:string~
Default values: default:value, e.g., status:boolean|default:true
column Modifiers
- Makes the field nullable
- Sets a default value in the migration
- Adds a foreign key constraint
- Adds delete behavior for foreign keys
Testing
This package uses Pest for testing:
🛠 Dev Requirements
-
PHP ^8.1
-
Laravel ^10 or ^11 or ^12
-
PestPHP for testing
- Laravel pint for code style fixer
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
🧑 Author
Sandeep Pant
License
This package is open-sourced software licensed under the MIT License.
All versions of crudify with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/filesystem Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/validation Version ^10.0|^11.0||^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0