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