I am using Laravel 6.0 and I try to list all my routes with artisan route:list
, but it fails and returns:
Illuminate\\Contracts\\Container\\
on Larave 7 I had the same issue.
I checked the spelling of the controller name.
I recognize I have the wrong spelling in the "AlbumContoller" and I rename it to "AlbumController". so I forgot "r"
after I renamed the file and controller name and controller name in the web.php
Route::resource('albums', 'AlbumsController');
everything worked well
So You Don't need these two:
1- use App\Http\Controllers\IndexContoller;
2- Route::get('/', [MyModelController::class, 'myFunction']);