top | item 4029514

(no title)

ellie42 | 13 years ago

Validations in routes, you're doing it right https://github.com/laravel/pastes/blob/master/application/ro...

discuss

order

tabbyjabby|13 years ago

I think the routing in that example is meant to be Sinatra-style routing for lightweight applications.

fruchtose|13 years ago

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.

daylerees|13 years ago

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