add models, setup livewire, setup mongodb

This commit is contained in:
yuriko 🦊 2025-05-21 15:14:50 -04:00
parent c0590a3412
commit be4c848eee
Signed by: jaiden
SSH key fingerprint: SHA256:f8tvveBoXBrKZIQDWLLcpQrKbATUCGg98x2N4YzkDM8
27 changed files with 2508 additions and 0 deletions

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Posts;
use App\Models\Post;
use Livewire\Attributes\Title;
use Livewire\Component;
use Livewire\WithPagination;
class Index extends Component
{
use WithPagination;
#[Title('Posts')]
public function render()
{
return view('livewire.posts.index', [
'posts' => Post::orderBy('created_at', 'desc')->paginate(25),
]);
}
}