nyaabooru/app/Livewire/Posts/View.php

22 lines
394 B
PHP

<?php
namespace App\Livewire\Posts;
use App\Models\Post;
use Livewire\Attributes\Validate;
use Livewire\Component;
class View extends Component
{
public Post $post;
#[Validate('string|max:240')]
public $comment = '';
public function render()
{
return view('livewire.posts.view', [
// 'comments' => $this->post->comments
])->title("Post {$this->post->id}");
}
}