vendredi 28 mai 2021

Laravel 5.1 route not expecting array

I have the following routes:

use NexCast\Domain\NiveisServico\NiveisServicoController;

Route::group(['prefix' => 'niveis-servico', 'name' => 'niveis-servico.'], function () {
    Route::get('/', [NiveisServicoController::class, 'getData'])->name('get');
    Route::post('/', [NiveisServicoController::class, 'saveData'])->name('save');
    Route::delete('/', [NiveisServicoController::class, 'deleteData'])->name('delete');
});

However I am receiving the following error:

Type error: ReflectionFunction::__construct() expects parameter 1 to be string, array given

What am I doing wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire