2015-10-16 32 views

回答

2

爲了您use語句來工作,你必須使用::class語法:

use App\Http\Controllers\BarController; 

$app->get('path', BarController::class.'@getId'); 

或者,也可以將命名空間添加到您的組:

$app->group(['prefix' => 'foo', 'namespace' => 'App\Http\Controllers'], function ($app) { 
    $app->get('path', 'BarControlle[email protected]'); 
}); 
+0

'BarController :: class。'@ getId'' - nope :( – Lexx918

+0

','namespace'=>'App \ Http \ Controllers'' - yep!tnx! – Lexx918