Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMax Smith
Courses Plus Student 3,973 PointsCould the name 'Todos' be anything?
Route::resource('todos','TodosController');
I am interested, what would happen if I change the 'todos' name to something else.
Route::resource('examplename','TodosController');
Does the name need to be the same as the folder within views? Or does it not matter. Just a little bit confused.
1 Answer
Corey Cramer
9,453 PointsThe name doesn't have to be the same, similar, or even close. Your example would work just fine if you went to: example.com/examplename
It would point to TodosController's index method and spit out whatever you set it to do there.