I have just got started with laravel v3 and am trying to wrap my head around eloquent\'s One-To-Many relationships by creating a blog, I have posts that have a many to one relat
Laravel 4 has a slightly different syntax , it uses camelCase to build expressions (while L3 uses snake_Case syntax).Laravel's (L4) new syntax is now PSR-1 compliant .
L3 : $this->belongs_to('Category');
L4 : $this->belongsTo('Category');
To prove that "eager loading" boosts the performance of your application (by minimizing database queries) , use Laravel's event eco-system .
// app/routes.php
Event::listen('illuminate.query', function($sql) { echo '' . $sql . '
' ;});
.