forked from eatvio/eatvio-infra
31 lines
477 B
PHP
31 lines
477 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Illuminate\Contracts\View\Factory as ViewFactory;
|
|
use Illuminate\Contracts\View\View;
|
|
use Livewire\Component;
|
|
|
|
class Counter extends Component
|
|
{
|
|
/**
|
|
* @var int
|
|
*/
|
|
public $count = 0;
|
|
|
|
public function inc(): void
|
|
{
|
|
$this->count++;
|
|
}
|
|
|
|
public function dec(): void
|
|
{
|
|
$this->count--;
|
|
}
|
|
|
|
public function render(): View|ViewFactory
|
|
{
|
|
return view('livewire.counter');
|
|
}
|
|
}
|