Created MessageType Enum
This commit is contained in:
parent
13183e6aad
commit
fada6d80e1
1 changed files with 38 additions and 0 deletions
38
app/Enums/MessageType.php
Normal file
38
app/Enums/MessageType.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self private()
|
||||
* @method static self public()
|
||||
*/
|
||||
class MessageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'private' => 1,
|
||||
'public' => 2
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'private' => trans('Privé'),
|
||||
'public' => trans('Public'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue