src/Controllers/BatchController.php
public function batch($page, Request $request)
    {
        $this->authorize($action = $request->get('batch_action'), $model = app('scaffold.module')->model());

        $response = app('scaffold.actions')->exec('batch::'.$action, [$model, $request]);

        if ($response instanceof Response || $response instanceof Renderable) {
            return $response;
        }

        return back()->with(
            'messages',
            [trans('administrator::messages.action_success')]
        );
    }
public function batch($page, Request $request)
    {
        $this->authorize($action = $request->get('batch_action'), $model = app('scaffold.module')->model());

        $response = app('scaffold.actions')->exec('batch::'.$action, [$model, $request]);

        if ($response instanceof Response || $response instanceof Renderable) {
            return $response;
        }

        return back()->with(
            'messages',
            [trans('administrator::messages.action_success')]
        );
    }
public function batch ( $ page , Request $ request ) { $ this -> authorize ( $ action = $ request -> get ( 'batch_action' ) , $ model = app ( 'scaffold.module' ) -> model ( ) ) ; $ response = app ( 'scaffold.actions' ) -> exec ( 'batch::' . $ action , [ $ model , $ request ] ) ; if ( $ response instanceof Response || $ response instanceof Renderable ) { return $ response ; } return back ( ) -> with ( 'messages' , [ trans ( 'administrator::messages.action_success' ) ] ) ; }
Perform a batch action against selected collection.

@param         $page
@param Request $request

@return \Illuminate\Http\RedirectResponse
Perform a batch action against selected collection .