Well, I don't believe there is a dispatch method on the Route class or a create method on the Request class.. Where did you see these methods?
Apr 27, 2019
5
Level 1
Internal Api Requests
hello, am consuming an internal API within the same laravel application.
Here is how am sending the request
$request = Request::create('/api/v1/login', 'POST',[
'name'=>Input::get('email'),
'password'=>Input::get('password')
]);
$response = Route::dispatch($request);
form_params are working well
Someone help how i can pass headers with authorization bearer token.
Level 1
@XTREMER360 - Here is how you can add it.
$request->headers->set('Authorization','Bearer '.token);
Please or to participate in this conversation.