I understand how to use Eloquent for basic queries and relationships, but I start getting confused when selecting information based on relationships in multiple tables.
//routes.php
/* relationship is : content has images(one to many). And I am extracting the images based on the name that is given in the search input ($keyword = Input::get('keyword') */
$dbresults = DB::table('contents')->join('images', 'images.content_id', '=', 'contents.id')->where('contents.Name', 'LIKE', '%' .$keyword. '%')->get();
return View::make('/results')->with("results", $dbresults);
View
@foreach($results as $result)
{{ $result->image_1 }}
@endforeach