canDo('schedule.calendar.approve')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.submit')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.publish')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.archive')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given calendar. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, Calendar $calendar) { if ($user->canDo('schedule.calendar.reject')) { return true; } return false; } }