testing different request received in controller and in service provider

keep it simple I have a controller method:

public function whatever(Request $request) {
  //dontcar
}

and I use “tymondesigns/jwt-auth” package and inside the service provider it has

 app('request')

in general they both should be the same…
but when I dump both of them, the one in the service provider points to “/” and the one in controller points to the right path.

This is called by the simple test:

 public function testPostCreate()
{
     $server = [
        'HTTP_Authorization' => 'Bearer '.$token
     ];
     $res = $this->put('/api/posts', [], $server);
}

any ideas why? or maybe a bug?


Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.