instances() ->where('principaluri', 'principals/'.$user->id) ->exists(); } /** * A user may create calendars for themselves. */ public function create(User $user): bool { return true; } /** * users may update or delete their calendar if an instance row exists */ public function update(User $user, Calendar $calendar): bool { return $this->view($user, $calendar); } public function delete(User $user, Calendar $calendar): bool { return $this->view($user, $calendar); } /** * determine whether the user can restore the model. */ public function restore(User $user, Calendar $calendar): bool { return false; } /** * determine whether the user can permanently delete the model. */ public function forceDelete(User $user, Calendar $calendar): bool { return false; } }