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