Added News page

This commit is contained in:
amikhaylov
2026-05-15 13:56:57 +03:00
parent 18a843b710
commit 4886612f7f
9 changed files with 172 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models\Loaders;
use App\Models\ORM\News;
class NewsLoader
{
public function getNews(int $offset = 0, int $limit = 10): array
{
$data = News::select("*")
->limit($limit)
->offset($offset)
->get();
return $data ? $data->toArray() : [];
}
}