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