Skip to content

IListModel

The IListModel interface defines the methods needed to list models.

Code

php
<?php

namespace Oscabrera\ModelRepository\Contracts\Resources;

use Illuminate\Pagination\LengthAwarePaginator;
use Oscabrera\QueryFilters\Utilities\QueryFilters;

/**
 * Interface IEntityList
 *
 * Defines the contract for classes that implement list functionality for entities.
 */
interface IListModel
{
    /**
     * Lists records from the database based on the given conditions.
     */
    public function list(QueryFilters $options): LengthAwarePaginator;
}

Released under the MIT License.