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