%PDF- %PDF-
Direktori : /var/www/pjc/app/Http/Livewire/ |
Current File : /var/www/pjc/app/Http/Livewire/Counter.php |
<?php namespace App\Http\Livewire; use App\pianficazioneutente; use Livewire\Component; class Counter extends Component { public $count = 0; public $mese; public $utente; protected $listeners = ['refreshTable' => 'like']; public function mount($me,$ut) { $this->mese = $me; $this->utente = $ut; $this->count = pianficazioneutente::where('mese',$this->mese)->where('idUtente',$this->utente)->sum('ore'); } public function increment() { $this->count++; } public function like() { $this->count = pianficazioneutente::where('mese',$this->mese)->where('idUtente',$this->utente)->sum('ore'); } public function render() { return view('livewire.counter'); } }