protected function getGateArguments($request, $models)
    {
        if (is_null($models)) {
            return [];
        }

        return collect($models)->map(function ($model) use ($request) {
            return $model instanceof Model ? $model : $this->getModel($request, $model);
        })->all();
    }
protected function getGateArguments($request, $models)
    {
        if (is_null($models)) {
            return [];
        }

        return collect($models)->map(function ($model) use ($request) {
            return $model instanceof Model ? $model : $this->getModel($request, $model);
        })->all();
    }
protected function getGateArguments ( $ request , $ models ) { if ( is_null ( $ models ) ) { return [ ] ; } return collect ( $ models ) -> map ( function ( $ model ) use ( $ request ) { return $ model instanceof Model ? $ model : $ this -> getModel ( $ request , $ model ) ; } ) -> all ( ) ; }
Get the arguments parameter for the gate.

@param  \Illuminate\Http\Request  $request
@param  array|null  $models
@return array|string|\Illuminate\Database\Eloquent\Model
Get the arguments parameter for the gate .