forked from eatvio/eatvio-infra
make static analyz for blogPost
This commit is contained in:
@@ -4,19 +4,23 @@ namespace App\Livewire\BlogPost;
|
||||
|
||||
use App\Models\BlogPost;
|
||||
use Livewire\Component;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class LikeCount extends Component
|
||||
{
|
||||
public BlogPost $blogPost;
|
||||
|
||||
protected $listeners = ['liked' => '$refresh'];
|
||||
protected function getListeners(): array
|
||||
{
|
||||
return ['liked' => '$refresh'];
|
||||
}
|
||||
|
||||
public function mount(BlogPost $blogPost)
|
||||
public function mount(BlogPost $blogPost): void
|
||||
{
|
||||
$this->blogPost = $blogPost;
|
||||
}
|
||||
|
||||
public function render()
|
||||
public function render(): View
|
||||
{
|
||||
return view(
|
||||
'livewire.blog-post.like-count',
|
||||
|
||||
Reference in New Issue
Block a user