I got a problem on phpunit I'm design route as
/v1/outlet/{outlet_id}/test
Route::get('outlets/{outlet_id}/test', ['as' => 'test'], function(){
return app('request')->route('outlet_id');
});
It's working when i call it in postman or brower but in phpunit show out as error
Call to a member function parameter() on array
test code
$req = $this->call('GET', '/v1/outlets/1/test');
$this->assertResponseStatus(200);
You have
outlets
plural in your test butoutlet
singular in your route definition.