you have to put your /hello above your /{restaurant}. Laravel is trying to resolve the {variable} instead of the /hello so its looking for a Restaurant model of /hello from that {} above
Route::get('/', 'RestaurantsController@index')->name('Restaurants.list');
Route::post('/', 'RestaurantsController@store');
Route::get('/create', 'RestaurantsController@create');
Route::get('/hello', 'RestaurantsController@hello'); //<--put this here so it is resolved before the following line
Route::get('/{restaurant}', 'RestaurantsController@showprofile')->name('restaurant.showprofile');
Route::put('/{restaurant}', 'RestaurantsController@update');
Route::delete('/{restaurant}', 'RestaurantsController@destroy');
Route::get('/{restaurant}/edit', 'RestaurantsController@edit');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community