hasAbility('create-widgetareas'); } /** * Determine whether the user can update the widgetArea. * * @param \App\Models\User $user * @param \App\WidgetArea $widgetArea * @return mixed */ public function update(User $user, WidgetArea $widgetArea) { return $user->id == $widgetArea->user_id || $user->hasAbility('edit-widgetareas'); } }