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