Files
2026-05-09 17:32:17 +02:00

20 lines
442 B
PHP
Executable File

<?php
declare(strict_types=1);
namespace App\Services\Community;
use App\Models\Miscellaneous\CameraWeb;
readonly class CameraService
{
public function fetchPhotos(bool $paginate = false, int $perPage = 8): mixed
{
$photos = CameraWeb::query()->where('visible', true)
->latest('id')
->with('user:id,username,look');
return $paginate ? $photos->paginate($perPage) : $photos->get();
}
}