27 lines
534 B
PHP
27 lines
534 B
PHP
<?php
|
|
|
|
namespace App\Repositories\Country;
|
|
|
|
use App\Models\Country;
|
|
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
|
|
use Illuminate\Support\Collection;
|
|
|
|
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();
|
|
}
|
|
}
|