Try this:
$posts = DB::select(DB::raw('SELECT title FROM posts'));
or:
$posts = DB::table('posts')->select('title')->get();
And returning View:
return View::make('hello', ['posts' => $posts]);
You need to assign the $posts
to a variable before sending to the view. In the above, the variable is posts
.