basket->campagne; if (!$campagne->camp_type->equals(CampaignTypes::panier())) { throw new \Exception('Campaign is not basket.'); } if ($campagne->camp_published === 0) { throw new \Exception('Campaign is not published.'); } if ($campagne->site->crm_token === null) { throw new \Exception('CRM Token is missing.'); } if ($campagne->site->crm_password === null) { throw new \Exception('CRM Password is missing.'); } } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return []; } }