xxxxxxxxxx
Target class [App\Http\Controllers\ServiceControler] does not exist.
xxxxxxxxxx
Route::get('/home', 'App\Http\Controllers\HomeController@index')->name('home');
xxxxxxxxxx
public function boot()
{
Route::prefix('api')
->middleware('api')
->namespace('App\Http\Controllers') // <---------
->group(base_path('routes/api.php'));
}
xxxxxxxxxx
Uncomment "protected $namespace = 'App\\Http\\Controllers';" line in "RouteServiceProvider.php" file and you should be good.