Fixes and cleanup for user pending/registration calls
This commit is contained in:
@@ -12,7 +12,6 @@ namespace App\Models\Enums;
|
||||
/**
|
||||
* Class EnumBase
|
||||
* @package App\Models\Enums
|
||||
* TODO: Implement lang translations for enum labels
|
||||
*/
|
||||
class EnumBase
|
||||
{
|
||||
@@ -29,4 +28,17 @@ class EnumBase
|
||||
return trans(static::$labels[$value]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all of the (translated) labels
|
||||
*/
|
||||
public static function labels()
|
||||
{
|
||||
$labels = [];
|
||||
foreach(static::$labels as $key => $label) {
|
||||
$labels[$key] = trans($label);
|
||||
}
|
||||
|
||||
return $labels;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,10 @@ class User extends Authenticatable
|
||||
'balance' => 'double',
|
||||
];
|
||||
|
||||
public static $rules = [
|
||||
|
||||
];
|
||||
|
||||
public function getPilotIdAttribute($value)
|
||||
{
|
||||
$length = setting('pilots.id_length');
|
||||
|
||||
Reference in New Issue
Block a user