I have a query that counts rows in a table that equal 5. For some reason it is running multiple times.
Here is the code that renders the view
public function manageDashboard()
{
$equipments = Equipment::where('status',1)->orderBy('order','ASC')->lists('name','id');
$tickets = Ticket::whereNotIn('status',[3,4,5])->orderBy('updated_at','ASC')->get();
$partial = Ticket::where('status',5)->count();
return view('manage.tickets.dashboard', compact('tickets','equipments','partial'));
}
.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community