dayName = Carbon::now()->locale('it_IT')->dayName; $this->totMembers = \App\Models\Member::count(); $this->totSuppliers = \App\Models\Supplier::count(); $this->totTodayIn = \App\Models\Record::where('type', 'IN')->where('date', date("Y-m-d"))->sum('amount'); $this->totTodayOut = \App\Models\Record::where('type', 'OUT')->where('date', date("Y-m-d"))->sum('amount'); } }