36 lines
832 B
PHP
36 lines
832 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Deceased;
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
|
|
interface DeceasedRepositoryInterface extends BaseRepositoryInterface
|
|
{
|
|
/**
|
|
* Get all deceased with optional filtering and pagination
|
|
*
|
|
* @param array $filters
|
|
* @param int $perPage
|
|
* @return LengthAwarePaginator
|
|
*/
|
|
public function getAllPaginated(array $filters = [], int $perPage = 15): LengthAwarePaginator;
|
|
|
|
/**
|
|
* Find a deceased by ID
|
|
*
|
|
* @param int $id
|
|
* @return Deceased
|
|
*/
|
|
public function findById(int $id): Deceased;
|
|
|
|
/**
|
|
* Search deceased by name
|
|
*
|
|
* @param string $name
|
|
* @return Collection
|
|
*/
|
|
public function searchByName(string $name): Collection;
|
|
}
|