Isnt just :
$count = DB::table('fixtures')->where('someid', '=', $id)->count();
echo $count;
?? :)
The first code is in your controller class? You can do that in the controller class and then return the variable to the view, like this:
$count = DB::table('fixtures')->where('someid', '=', $id)->count();
return View::make('view/path')->with('count', $count);
And in your view call the variable
$count
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community