Hacker News new | ask | show | jobs
by ellie42 5139 days ago
Validations in routes, you're doing it right https://github.com/laravel/pastes/blob/master/application/ro...
1 comments

I think the routing in that example is meant to be Sinatra-style routing for lightweight applications.
I 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.

Hey, 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. :)