laravel-dynamic-crud-operation

Description about package
- This package is useful for Developers to easily create a CRUD (Create, Read, Update, Delete) for API Integration.
- Below are the command to use this feature.
composer require thilagaraja/laravelcurdmvc
composer require intervention/image
System require
add below in config/app.php
Thilagaraja\Laravelcurdmvc\LaravelCurdMvcProvider::class
'Input' => Illuminate\Support\Facades\Request::class,
Need to disable csrf
- App\Http\Middleware\VerifyCsrfToken.php
protected $except = [
'webhook/*', // Disable CSRF protection for routes matching the "webhook/*" pattern
];
- install below package for the following error => class 'form' not found
composer require laravelcollective/html
CRUD Operation API's
Step 1 : Master API for module creation
{
"module" : "module name here",
"fields" : [
{
"column" : "email",
"date_type" : "string",
"required" : true,
"unique" : true
},
{
"column" : "image",
"date_type" : "string"
}
]
}
- Data types : string, integer, date, dateTime, bigInteger
- See the json file all data types Sample Payload
- This package will create one master table in your project for unique module validation. The table name is crud_master and avatar table for image upload.
- If you want to image column on module, you need to specify column name as 'image'. So it automatically consider as file upload.
- And each module has an seperate table.
Step 2 : Run migration for table creation
- After run the master module api, below file will be created automatically in your project folder
- Migration file, Controller file, Module File and routes on web.php file.
- Need to run following command
php artisan migrate
- As of now we have only create table migration. If you want to alter table You can manually update the migration file as usual.
Step 3 : Use the API End points
- Now you can download the postman collection for CRUD Operation Download Collection
- API End Points