Have a look at this link: http://laravel.com/docs/controllers#resource-controllers
When you define Route::resource...., laravel automatically creates multiple routes for you. So, you don't need to define another Route::get....
sattalk said:
Have a look at this link: http://laravel.com/docs/controllers#resource-controllers
When you define Route::resource...., laravel automatically creates multiple routes for you. So, you don't need to define another Route::get....
but it only define for index,store ,create,show,edit,update ,destroy function but not for my custom function pingme() ,so now what
Resource routes are for creating RESTful APIs. These create a default set of routes and actions. If you don't want any of those Actions and Routes, you should write your own get or post route as:
Route::get('foo', 'FooBarController@foo');
or
Route::post('bar', FooBarController@bar);
Here you are explicitly defining your get and post routes.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community