I have just cloned Laravel 8 /Vue js project and I am trying to run it, I have got this error
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type int, array given, called in C:\lab\vue-laravel-crud-2\vue-laravel-crud\vendor\fideloper\proxy\src\TrustProxies.php on line 54
I have googled this error and I have added this to my code but It was not working This is how was the code
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
I have replaced it with this code
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
But the error is remaining , do anyone has an idea about this error as I have googled it a lot and nothing was found . Thanks in advance .