I intend to rely on such database Developer how many categories there and give me a value. I can do but doing echo in my index page he retorname the value 2 because there is a Developer and Design. I intend it to me just one because I want to make an echo so the Developer. My code is as follows
Index
<?php echo $portfolio['Developer']; ?>
Controller
$portfolio = DB::table('portfolio')->where('portfolio.category','=','Developer')
->orWhere('portfolio.category','=','Design')
->count();
return view('backend/dashboard.index', [
'portfolio' => $portfolio,
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire