1
組(或回調)中的命名空間不起作用(Lumen,Laravel)?我想從routes.php中移除代碼給控制器。所以!Laravel,類別控制器不存在於帶有前綴的路由中
use App\Http\Controllers;
// OK!
$app->get('path', '[email protected]');
$app->group(['prefix' => 'foo'], function ($app) {
// OK!
$app->get('path', '\App\Http\Controllers\[email protected]');
// Class BarController does not exist
$app->get('path', '[email protected]');
});
'BarController :: class。'@ getId'' - nope :( – Lexx918
','namespace'=>'App \ Http \ Controllers'' - yep!tnx! – Lexx918