guard('contact')->user()->client; $available_methods = []; collect($client->service()->getPaymentMethods(-1)) ->filter(function ($method) use (&$available_methods) { $available_methods[] = $method['gateway_type_id']; }); if (in_array($this->query('method'), $available_methods)) return true; return false; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } }