Laravel Framework 5.6.39 Я получаю эту ошибку:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Function name must be a string
Вот что я делаю.В моем App/RouteServiceProvider.php
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
$this->mapMercuriusRoutes();
}
protected function mapMercuriusRoutes()
{
Route::middleware(['web','auth','Mercurius'])
->namespace('\Launcher\Mercurius\Http\Controllers')
->group(base_path('routes/mercurius.php'));
}
Затем мой файл маршрута mercurius.php
:
// Mercurius home
Route::get('/messages', ['as' => 'home', 'uses' => 'MessagesController@index']);
// User Profile
Route::get('/profile/refresh', 'ProfileController@refresh');
Route::get('/profile/notifications', 'ProfileController@notifications');
Route::post('/profile', 'ProfileController@update');
Когда я перехожу на localhost: 8000 / messages, как указано в файле маршрутов Mercurius, я получаюошибка.Есть идеи, что я делаю неправильно?
РЕДАКТИРОВАТЬ: НАЧАЛЬНЫЕ ОШИБКИ:
$response = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
$ pipe (... $ параметры);является выделенным.
Symfony\Component\Debug\Exception\FatalThrowableError
…/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php152
Illuminate\Pipeline\Pipeline Illuminate\Pipeline\{closure}
…/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53
Illuminate\Routing\Pipeline Illuminate\Routing\{closure}
…/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php41