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
21
app/Livewire/Posts/Index.php
Normal file
21
app/Livewire/Posts/Index.php
Normal 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),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue