Add Radio Callsign To Airlines (#1475)
Adds a new db field for radio telephony callsign for airlines. Also adds necessary field to admin template.
This commit is contained in:
parent
695ab3a90d
commit
64e470abec
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Contracts\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class() extends Migration {
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('airlines', function (Blueprint $table) {
|
||||||
|
$table->string('callsign')->nullable()->after('name');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@ -16,6 +16,7 @@ use Illuminate\Support\Str;
|
|||||||
* @property string icao
|
* @property string icao
|
||||||
* @property string iata
|
* @property string iata
|
||||||
* @property string name
|
* @property string name
|
||||||
|
* @property string callsign
|
||||||
* @property string logo
|
* @property string logo
|
||||||
* @property string country
|
* @property string country
|
||||||
* @property Journal journal
|
* @property Journal journal
|
||||||
@ -37,6 +38,7 @@ class Airline extends Model
|
|||||||
'icao',
|
'icao',
|
||||||
'iata',
|
'iata',
|
||||||
'name',
|
'name',
|
||||||
|
'callsign',
|
||||||
'logo',
|
'logo',
|
||||||
'country',
|
'country',
|
||||||
'total_flights',
|
'total_flights',
|
||||||
@ -66,6 +68,7 @@ class Airline extends Model
|
|||||||
'icao' => 'required|max:5',
|
'icao' => 'required|max:5',
|
||||||
'logo' => 'nullable',
|
'logo' => 'nullable',
|
||||||
'name' => 'required',
|
'name' => 'required',
|
||||||
|
'callsign' => 'nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,31 +1,32 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Code Field -->
|
<div class="form-group col-sm-4">
|
||||||
<div class="form-group col-sm-6">
|
{{ Form::label('icao', 'ICAO (3LD):') }} <span class="required">*</span>
|
||||||
{{ Form::label('icao', 'Code:') }} <span class="required">*</span>
|
|
||||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
{{ Form::label('iata', 'IATA (2LD):') }}
|
||||||
|
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||||
|
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
{{ Form::label('callsign', 'Radio Callsign:') }}
|
||||||
|
{{ Form::text('callsign', null, ['class' => 'form-control']) }}
|
||||||
|
<p class="text-danger">{{ $errors->first('callsign') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Name Field -->
|
<div class="row">
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-4">
|
||||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group col-sm-8">
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
{{ Form::label('iata', 'IATA:') }}
|
|
||||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
|
||||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
{{ Form::label('logo', 'Logo URL:') }}
|
{{ Form::label('logo', 'Logo URL:') }}
|
||||||
{{ Form::text('logo', null, ['class' => 'form-control']) }}
|
{{ Form::text('logo', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('logo') }}</p>
|
<p class="text-danger">{{ $errors->first('logo') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -34,7 +35,6 @@
|
|||||||
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
|
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
|
||||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
{{ Form::label('active', 'Active:') }}
|
{{ Form::label('active', 'Active:') }}
|
||||||
<br/>
|
<br/>
|
||||||
@ -44,8 +44,8 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Submit Field -->
|
|
||||||
<div class="form-group col-sm-12">
|
<div class="form-group col-sm-12">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user