koel/app/Repositories/Contracts/RepositoryInterface.php

19 lines
437 B
PHP

<?php
namespace App\Repositories\Contracts;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
interface RepositoryInterface
{
public function getOne($id): Model;
public function findOne($id): ?Model;
/** @return Collection<Model> */
public function getMany(array $ids, bool $inThatOrder = false): Collection;
/** @return Collection<Model> */
public function getAll(): Collection;
}