In my Laravel package package I'm testing an api endpoint, but I always get a 404 response!?!?
Here is the file (see unsuccessfulLogin
method):
$this->post('/under/check', ['code' => 1235]);
In my service provider:
$routeConfig = [
'namespace' => 'LarsJanssen\UnderConstruction\Controllers',
'prefix' => 'under',
'middleware' => [
'web',
],
];
$this->getRouter()->group($routeConfig, function ($router) {
$router->post('check', [
'uses' => 'CodeController@check',
'as' => 'underconstruction.check',
]);
$router->get('construction', [
'uses' => 'CodeController@index',
'as' => 'underconstruction.index',
]);
$router->get('js', [
'uses' => 'AssetController@js',
'as' => 'underconstruction.js',
]);
});
I register these routes! And in postman it's working. So why is it not working in my test?
Aucun commentaire:
Enregistrer un commentaire