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