I have a resource controller which is ArticleController and I want to call this controller in web.php, so I coded:
use App\Http\Controllers\Admin\PanelController;
use App\Http\Controllers\Admin\ArticleController;
Route::namespace('Admin')->prefix('admin')->group(function(){
Route::get('/admin/panel', [PanelController::class, 'index']);
Route::resource('articles', [ArticleController::class]);
});
Then I tried the command php artisan route:list to check the routes but I get this error message:
ErrorException
Array to string conversion
So why this error occurs, how can I fix it?