n1creator/laravel-crud

This package is abandoned and no longer maintained. No replacement package was suggested.

Package implements CRUD to laravel

dev-main 2021-11-26 08:45 UTC

This package is auto-updated.

Last update: 2023-12-28 20:41:29 UTC


README

Example usage

always $data - should be validated

Create Model
use N1Creator\Crud;
...
$data = [
    'name' => 'John',
    'email' => 'john@ltd.com',
    'roles' => [1,2,3],
];
Crud::model(new User)->store($data);
...
Update Model
use N1Creator\Crud;
...
$data = [
    'name' => 'John Smit',
    'email' => 'john@ltd.com',
    'roles' => [3],
];
$user = User::find($id);
Crud::model($user)->update($data);
...