Cleaning up database fields, fix types and columns
This commit is contained in:
@@ -28,15 +28,9 @@ class Subfleet extends Model
|
||||
protected $casts = [
|
||||
'airline_id' => 'integer',
|
||||
'fuel_type' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $rules = [
|
||||
|
||||
'cargo_capacity' => 'double',
|
||||
'fuel_capacity' => 'double',
|
||||
'gross_weight' => 'double',
|
||||
];
|
||||
|
||||
public function airline()
|
||||
|
||||
@@ -16,7 +16,7 @@ trait HashId
|
||||
$key = $model->getKeyName();
|
||||
|
||||
if (empty($model->{$key})) {
|
||||
$hashids = new Hashids('', 10);
|
||||
$hashids = new Hashids('', 12);
|
||||
$mt = str_replace('.', '', microtime(true));
|
||||
$id = $hashids->encode($mt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user