Add branch & province model

This commit is contained in:
2023-11-23 15:34:04 +05:00
parent 0309e8f7d8
commit fe68420bab
11 changed files with 490 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
<?php
namespace App\Repos\Branch;
class BranchRepo
{
}

View File

@@ -0,0 +1,73 @@
<?php
namespace App\Repos\System\Settings\Location;
class RegionRepo
{
/**
* Mary
*/
public const MR = 'mr';
/**
* Aşgabat
*/
public const AG = 'ag';
/**
* Arkadag
*/
public const AK = 'ak';
/**
* Ahal
*/
public const AH = 'ah';
/**
* Lebap
*/
public const LB = 'lb';
/**
* Balkan
*/
public const BN = 'bn';
/**
* Daşoguz
*/
public const DZ = 'dz';
/**
* Regions
*/
public static function values(): array
{
return [
self::AG => __('Ashgabat'),
self::AK => __('Arkadag'),
self::MR => __('Mary'),
self::AH => __('Ahal'),
self::LB => __('Lebap'),
self::BN => __('Balkan'),
self::DZ => __('Dashoguz'),
];
}
/**
* Default region
*/
public static function default(): string
{
return self::AG;
}
/**
* Label for given region
*/
public static function label(string $region = 'ag'): string
{
return static::values()[$region] ?? '';
}
}