0
我正在嘗試爲我正在創建的項目創建子域路由,並且我能夠獲得子域的工作。但是,唯一的作用是直接從routes.php返回一些副本。當我試圖訪問一個控制器時,它告訴我它沒有被發現,當它明顯存在時。Laravel 5子域路由 - 找不到控制器問題
此代碼:
Route::group(['domain' => 'demo.tk.dev'], function(){
Route::get('/', '[email protected]');
});
返回我這個錯誤:
ReflectionException in Route.php line 280:
Class app\Http\Controllers\DemoController does not exist
但是,如果我做這樣的事情:
Route::group(['domain' => 'demo.tk.dev'], function(){
Route::get('/', function() {
return 'Success';
});
});
隨後的作品。
我沒有看到文檔中有關控制器使用子域進行任何其他更改的任何內容。我錯過了什麼嗎?任何幫助將不勝感激。