mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
This commit is contained in:
parent
21e59d775a
commit
f60ae41bf6
26 changed files with 741 additions and 70 deletions
|
|
@ -8,6 +8,7 @@ use Livewire\Component;
|
|||
class PostFeature extends Component
|
||||
{
|
||||
public ?Post $post = null;
|
||||
public $tags = null;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
|
|
@ -18,6 +19,7 @@ class PostFeature extends Component
|
|||
['$sample' => ['size' => 1]]
|
||||
]);
|
||||
})->first();
|
||||
$this->tags = $this->post->tags()->take(5)->get();
|
||||
}
|
||||
|
||||
public function placeholder()
|
||||
|
|
@ -36,7 +38,6 @@ HTML;
|
|||
{
|
||||
if ($this->post == null)
|
||||
{
|
||||
$href = route('posts.home');
|
||||
return view('livewire.post-feature-empty');
|
||||
}
|
||||
return view('livewire.post-feature');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue