create daily accident cartable
This commit is contained in:
28
app/Enums/AccidentWeatherConditions.php
Normal file
28
app/Enums/AccidentWeatherConditions.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum AccidentWeatherConditions: int
|
||||
{
|
||||
case BARFI= 1;
|
||||
case KOLAK = 2;
|
||||
case AFTABI = 3;
|
||||
|
||||
case BARANI = 4;
|
||||
case YAKHBANDAN = 5;
|
||||
case MEH = 6;
|
||||
|
||||
public static function name(int $state): string
|
||||
{
|
||||
$mapArray = [
|
||||
1 => 'برفی',
|
||||
2 => 'کولاک',
|
||||
3 => 'آفتابی',
|
||||
4 => 'بارانی',
|
||||
5 => 'یخبندان',
|
||||
6 => 'مه آلود',
|
||||
];
|
||||
|
||||
return $mapArray[$state];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user