mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 10:54:41 +00:00
Offer and order controllers
This commit is contained in:
14
backend/app/Enums/Arrayable.php
Normal file
14
backend/app/Enums/Arrayable.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
trait Arrayable
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function values(): array
|
||||
{
|
||||
return array_column(self::cases(), 'value');
|
||||
}
|
||||
}
|
||||
13
backend/app/Enums/OrderTypesEnum.php
Normal file
13
backend/app/Enums/OrderTypesEnum.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum OrderTypesEnum: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case HOUSE = 'House';
|
||||
case FLAT = 'Flat';
|
||||
case GUEST_HOUSE = 'Guest';
|
||||
case HOTEL = 'Hotel';
|
||||
}
|
||||
Reference in New Issue
Block a user