Support the ongoing development of Laravel.io →
Requests Input Session
Last updated 4 months 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 4 months 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 4 months 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', '[email protected]');

or

Route::post('bar', [email protected]);

Here you are explicitly defining your get and post routes.

Last updated 4 months ago.
0

Sign in to participate in this thread!

LoadForge

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?

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

© 2022 Laravel.io - All rights reserved.