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