mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
add models, setup livewire, setup mongodb
This commit is contained in:
parent
c0590a3412
commit
be4c848eee
27 changed files with 2508 additions and 0 deletions
22
app/Livewire/Posts/View.php
Normal file
22
app/Livewire/Posts/View.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?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}");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue