TASSILI Docs
search
menu
TASSILI Docs
search
search
Group actions
Put yours actions in the initBulk() method. By default already one action is created.here is an example for Model Post.

    $this->utility->addBulk([
        'className' => '\App\Http\Controllers\Tassili\Admin\Crud\Post\Listings\Bulks\Bulk',
        'action' => 'bulk1',
        'permissions' => [],
        'label' => 'Ajouter',
        'icon' => 'description',
        'class' => 'text-white',
        'confirmation' => 'Are you sure to change records',
        'message' => 'Records changed'
    ]);

Here is the first action created
public function bulk1(Request $request)
{  

    $this->modelClass::whereIn('id', $request->actionIds)->update([
        'name' => 'Fiat'
    ]);

}