forked from eatvio/eatvio-infra
eating plan added
This commit is contained in:
28
app/Http/Livewire/Plan/LikeCount.php
Normal file
28
app/Http/Livewire/Plan/LikeCount.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Plan;
|
||||
|
||||
use Livewire\Component;
|
||||
use App\Models\Plan;
|
||||
|
||||
class LikeCount extends Component
|
||||
{
|
||||
public Plan $plan;
|
||||
|
||||
protected $listeners = ['liked' => '$refresh'];
|
||||
|
||||
public function mount(Plan $plan)
|
||||
{
|
||||
$this->plan = $plan;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view(
|
||||
'livewire.plan.like-count',
|
||||
[
|
||||
'count' => $this->plan->likes_count
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user