Laravel will load related records automatically when you try to access them, after running your query. You can also (and probably should) use Eager Loading so that it loads those related records straight away, saving on the number of queries being run...
http://laravel.com/docs/eloquent#eager-loading
$locations = Locations::with('relationship')->where('location_id', '=', $location_id)->get();
// Blade
@foreach($locations as $location)
@foreach($location->relationship as $relationship)
// Access relationships here...
@endforeach
@endforeach
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community