Support the ongoing development of Laravel.io →
Requests Input Session
Last updated 2 years ago.
0

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....

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

sksethi25 sksethi25 Joined 7 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.