company_id = $company_id; } /** * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { $company = Company::find($this->company_id); return $company->clients->count() < config('ninja.quotas.free.clients'); } /** * @return string */ public function message() { return ctrans('texts.limit_clients', ['count' => config('ninja.quotas.free.clients')]); } }