Hi,
at first i’d like to notice that i’m a noob when it comes to creating api endpoints and i’m struggling to overcome my bug but no results yet
I have such route:
Route::group(['prefix' => 'api/v3/', 'middleware' => 'auth.basic'], function() {
//Products
Route::get('/products/{id}', [ProductsController::class, 'getProduct']);
Route::get('/products', [ProductsController::class, 'index']);
});
when trying to access either endpoint i get error saying:
Target [Illuminate\Contracts\Auth\Factory] is not instantiable while building [Illuminate\Auth\Middleware\AuthenticateWithBasicAuth]
is there something else i need to configure to make this work properly?
without middleware all is working as expected, but i want to add this basic auth.
Many thanks