src/Controllers/ScaffoldController.php
public function action($page, $id, $action)
    {
        $this->authorize($action, $eloquent = app('scaffold.model'));

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

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

        return back()->with(
            'messages',
            [trans('administrator::messages.action_success')]
        );
    }
public function action($page, $id, $action)
    {
        $this->authorize($action, $eloquent = app('scaffold.model'));

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

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

        return back()->with(
            'messages',
            [trans('administrator::messages.action_success')]
        );
    }
public function action ( $ page , $ id , $ action ) { $ this -> authorize ( $ action , $ eloquent = app ( 'scaffold.model' ) ) ; $ response = app ( 'scaffold.actions' ) -> exec ( 'action::' . $ action , [ $ eloquent ] ) ; if ( $ response instanceof Response || $ response instanceof Renderable ) { return $ response ; } return back ( ) -> with ( 'messages' , [ trans ( 'administrator::messages.action_success' ) ] ) ; }
Custom action related to item.

@param $page
@param $id
@param $action

@return \Illuminate\Http\RedirectResponse
Custom action related to item .