Yes to 'include by default'.
Informal Poll: Routes File
Quick little informal poll here...
Currently, Laravel 5 ships with a "routes.php" file in the App\Http directory. This file is included by the RouteServiceProvider.
Do you think we should continue to include this file by default, or let someone include their own routes file (that they create) if they wish from their RouteServiceProvider?
+1 to include by default
Yes still include it.
Unless you're ready for the "where do I put my routes?" questions lol
Yes to include by default. This is a convenient place for beginners.
No. But I like the new annotations system and plan on using that, so I guess people's reply will mostly depend on that.
Thanks for responses so far. To ask another question: Are you satisfied with its location in Laravel 5?
I vote it gets taken out. executive decisions like this have already helped me become a better developer, encouraged the implementation of better practices.
I'm okay with the location of the file @TaylorOtwell :)
Location makes sense to me.
Hi Taylor, Many thanks for your great work. In my opinion I think the routes.php should be included by default. I for one currently have several route files that end up sort of being linked to the controllers eg SessionsController and SessionRoutes.php in a Routes dir but I still think that the user should have the choice. Especially as Laravel has a great reputation for ease of use and fantastic learning curve..
Thanks again Taylor
Yes to keeping the example file in place.
I think it should stay. It's good for simple stuff and throwing together things for testing purposes before moving to a different structure when your app get larger.
+1 for include by default and current location of the file.
include by default, location is fine, example is overkill.
+1 for keeping it, even if the examples in it are commented out by default.
My opinion is split. But maybe add a route command to create the Router files that is needed to use the "router.php" file and then leave it out by default. As long as it possible
Please keep the file. It makes sense where it is. Should be placed with controllers.
+1 for keeping it.
i think it would be better in Routes folder
I use your default files as examples to learn and build from. So +1 for keeping it.
+1 keep it.
Yes to include by default, but I'd like it to be moved to the resources directory maybe? I like the idea of having only classes under the App directory. What do you guys think?
I'm happy with the current file location. Also good for beginners as @antoineaugusti said.
There are hundreads of tutorials at the moment talking about that file and it's like the "official" starting point for any newbie since older versions.
+1 keep, location makes sense too
+1 for keeping it and where it is as people have already learned where it is. Easier for beginner and more advanced users will definitely going for service provider and/or annotations.
+1 keep it pls / location makes sense / examples, too.
But think about whether it will confuse newcomers, when they see a routes.php file, but also route annotations in the sample HomeController.
Does Laravel want to encourage the use of route annotations, or just provide them as an option? That's a very important question.
Please include it by default..
As for confusion, just put comments in the routes.php file explaining that you can use route annotations. This is a great place to introduce newcomers to the annotations as well. Personally, i'll use annotations, but routes.php file is important for newcomers.
Keep, only large/complex applications might need change the structure and deviate from a plain old routes file. Let developers decide when it's time and avoid premature optimisation..
Please or to participate in this conversation.