You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user