- Add Enums
This commit is contained in:
parent
bd9cd56fff
commit
7e381502c2
4 changed files with 40 additions and 1 deletions
35
app/Enums/CampaignTypes.php
Normal file
35
app/Enums/CampaignTypes.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self mur()
|
||||
* @method static self panier()
|
||||
* @method static self murss()
|
||||
* @method static self paniers()
|
||||
*/
|
||||
|
||||
class CampaignTypes extends BaseEnum
|
||||
{
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'mur' => 0,
|
||||
'panier' => 1,
|
||||
'murss' => 2,
|
||||
'paniers' => 3,
|
||||
];
|
||||
}
|
||||
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'mur' => trans('Mur'),
|
||||
'panier' => trans('Panier'),
|
||||
'murss' => trans('Mur sans sélection'),
|
||||
'paniers' => trans('Panier Sélectionnable'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
"barryvdh/laravel-dompdf": "^0.9.0",
|
||||
"doctrine/dbal": "^2.8",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"kwaadpepper/enum": "^2.0",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^3.0",
|
||||
|
|
|
|||
2
composer.lock
generated
2
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "5a3ebedda9d69b70bcd95eec2618c1fb",
|
||||
"content-hash": "9faaf15819beae6797560e126dd15e3b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "barryvdh/laravel-dompdf",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Enums\CampaignTypes;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|
|
@ -214,6 +216,7 @@ return [
|
|||
'Html' => Collective\Html\HtmlFacade::class,
|
||||
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'CampaignType' => CampaignTypes::class,
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue