<?php

namespace App\Services\Views;

use App\Models\PhotoGroup;

class PhotoGroupService
{
    public function list($id)
    {
        $data = PhotoGroup::with('description')->where('pid', $id)->flag()->oldest('orders')->get();

        return $data ?? [];
    }
}