trf_certest/app/Repositories/Country/EloquentCountry.php
2025-02-26 08:57:46 +01:00

27 lines
537 B
PHP

<?php
namespace Vanguard\Repositories\Country;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Support\Collection;
use Vanguard\Country;
class EloquentCountry implements CountryRepository
{
/**
* {@inheritdoc}
*/
public function lists($column = 'name', $key = 'id'): Collection
{
return Country::orderBy('name')->pluck($column, $key);
}
/**
* {@inheritdoc}
*/
public function all(): EloquentCollection
{
return Country::all();
}
}