reorganize and cleanup php server code

This commit is contained in:
2026-02-06 13:12:38 +01:00
parent bf2f18f847
commit a6785f26db
3103 changed files with 494 additions and 351462 deletions
@@ -0,0 +1,21 @@
<?php
namespace Vanguard\Repositories\Country;
interface CountryRepository
{
/**
* Create $key => $value array for all available countries.
*
* @param string $column
* @param string $key
* @return mixed
*/
public function lists($column = 'name', $key = 'id');
/**
* Get all available countries.
* @return mixed
*/
public function all();
}
@@ -0,0 +1,24 @@
<?php
namespace Vanguard\Repositories\Country;
use Vanguard\Country;
class EloquentCountry implements CountryRepository
{
/**
* {@inheritdoc}
*/
public function lists($column = 'name', $key = 'id')
{
return Country::orderBy('name')->pluck($column, $key);
}
/**
* {@inheritdoc}
*/
public function all()
{
return Country::all();
}
}