fix aircraft status field type in model
This commit is contained in:
@@ -44,7 +44,6 @@ class Aircraft extends Model
|
||||
protected $casts = [
|
||||
'subfleet_id' => 'integer',
|
||||
'zfw' => 'float',
|
||||
'status' => 'integer',
|
||||
'state' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
@@ -108,7 +108,12 @@ class ImportService extends Service
|
||||
|
||||
// turn it into a collection and run some filtering
|
||||
$row = collect($row)->map(function ($val, $index) {
|
||||
return trim($val);
|
||||
$val = trim($val);
|
||||
if($val === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $val;
|
||||
})->toArray();
|
||||
|
||||
# Try to validate
|
||||
|
||||
Reference in New Issue
Block a user