I'm having some trouble accessing controllers from web.php and api.php in my Laravel 8 application. I've read this post and I've been through the docs, from which I uncommented $namespace in the RouteServiceProvider, but up to now I've had no luck.
This is my api.php file:
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers;
use App\Http\Controllers\SoapController;
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
Route::get('currency', 'SoapController@show');
And below is the error that I get when I try and load the /api/currency route:
Does anyone know how to get this working if I've tried both explicit naming and uncommenting $namespace in ServiceRouteProvider? (also, I've run compoaser dump-autoload)
One consideration is that I've installed the notfalsedev / laravel-soap package to try and get SOAP support working, not sure if it is messing things up...