6 ms·
Validations in routes, you're doing it right https://github.com/laravel/pastes/blob/master/application/routes.php#L52-66 https://github.com/laravel/pastes/blob/
by ellie42 14y ago
Validations in routes, you're doing it right https://github.com/laravel/pastes/blob/master/application/routes.php#L52-66 https://github.com/laravel/pastes/blob/master/application/ro...
- tabbyjabby 14y agoI think the routing in that example is meant to be Sinatra-style routing for lightweight applications.
- fruchtose 14y agoI really like this approach. It's one of the reasons I like Express in node.js. I am by no means a fan of PHP after using it on several projects, but if I were forced at gunpoint I would look into Laravel. I also like the DB table creation code. ActiveRecord-type model delcarations are fine, but I'm interested in exploring Mongoose-type ORM, since I suspect it is more flexible in the long run.
- daylerees 14y agoHey, Dayle Rees here, (guy who made the getlaravel.com promo site) I also wrote the pastes app, and the reason I chose to use routes is that its a tiny application, and using routes avoided all the unnecessary "class fluff" allowing me to prototype quickly. On a large scale app I would have used controllers, which are also available. :)