chore: code refactor via rector
This commit is contained in:
@@ -11,10 +11,10 @@ class Blog extends Component
|
||||
|
||||
public $category;
|
||||
|
||||
public function mount($slug)
|
||||
public function mount($slug): void
|
||||
{
|
||||
$this->postDetail = \App\Models\Blog::where('slug', $slug)->firstOrFail();
|
||||
$this->category = Category::where('id', $this->postDetail->category_id)->first();
|
||||
$this->postDetail = \App\Models\Blog::query()->where('slug', $slug)->firstOrFail();
|
||||
$this->category = Category::query()->where('id', $this->postDetail->category_id)->first();
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
||||
Reference in New Issue
Block a user