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