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 trialYoung Sam Pinheiro
Courses Plus Student 988 PointsWhats the difference between todos.index and todos/index in the Route function?
On the video, around 04:01, the instructor configures the routes as follows:
Route::get('todos', function() { return View::make('todos/index'); });
Whats the difference between the slash and the dot notation:
return View::make('todos.index'); and return View::make('todos/index');
1 Answer
Christopher Rebacz
10,904 PointsThey are both the same in laravel. The framework allows you to write out the path to views using either a. / or a . It is for user preference. Some people like dot syntax and others find it more readable to use the slashes because it looks like a file path.