user()->rank < 6) { return Action::danger('You are not authorized to perform this action.'); } foreach ($models as $model) { $model->update(['is_published' => true]); } } /** * Get the fields available on the action. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function fields(NovaRequest $request) { return []; } }