Reputation: 51
I'd start a new laravel project, and want to make a controller called ProductController
using Artisan, but it ends up with an error
“BadMethodCallException : Method Illuminate\Routing\Route::get does not exist.“
I'm using laravel 6.0
routes:
Route::get('/products', 'ProductController@index');
Command used:
php artisan make:controller ProductController
Upvotes: 3
Views: 7538
Reputation: 1
you maybe
use
href="{{route('--')}}"
instead of
href="{{url('---')}}"
for routing in your blade , just change it to href="{{url('---')}}"
Upvotes: 0
Reputation: 11044
Import the Route
facade instead of Illuminate\Routing\Route
use Illuminate\Support\Facades\Route;
Upvotes: 4