Aircraft Controller refactor and localization

This commit is contained in:
Gogs
2021-06-03 20:25:24 +02:00
parent d6dbb3f1e7
commit 3e90d8cbe1
13 changed files with 40 additions and 33 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ class Aircraft extends Model
/**
* @var array Validation rules
*/
public $rules = [];
public $rules = [
'aircraft_type' => 'required',
'registration' => 'required',
'name' => 'required',
'home_airport_id' => 'required',
];
public $belongsTo = [
'aircraft_type' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
+4 -4
View File
@@ -1,23 +1,23 @@
fields:
aircraft_type:
label: Type
label: 'germanairlinesva.fleet::lang.aircrafts.type'
nameFrom: type
descriptionFrom: description
span: auto
required: 1
type: relation
registration:
label: Registration
label: 'germanairlinesva.fleet::lang.aircrafts.registration'
span: auto
required: 1
type: text
name:
label: Name
label: 'germanairlinesva.fleet::lang.aircrafts.name'
span: auto
required: 1
type: text
home_airport_id:
label: 'Home Base'
label: 'germanairlinesva.fleet::lang.aircrafts.home_base'
span: auto
required: 1
type: number