diff --git a/app/Database/migrations/2017_06_11_135707_create_airports_table.php b/app/Database/migrations/2017_06_11_135707_create_airports_table.php index 399a1e11..e56aaafc 100644 --- a/app/Database/migrations/2017_06_11_135707_create_airports_table.php +++ b/app/Database/migrations/2017_06_11_135707_create_airports_table.php @@ -14,7 +14,7 @@ class CreateAirportsTable extends Migration $table->string('name', 100); $table->string('location', 100)->nullable(); $table->string('country', 64)->nullable(); - $table->string('tz', 64)->nullable(); + $table->string('timezone', 64)->nullable(); $table->boolean('hub')->default(false); $table->unsignedDecimal('fuel_100ll_cost', 8)->nullable()->default(0); $table->unsignedDecimal('fuel_jeta_cost', 8)->nullable()->default(0); diff --git a/app/Models/Airport.php b/app/Models/Airport.php index 5e8edfac..2045973b 100644 --- a/app/Models/Airport.php +++ b/app/Models/Airport.php @@ -90,8 +90,8 @@ class Airport extends BaseModel /** * @return string */ - public function getTimezoneAttribute(): string + public function getTzAttribute(): string { - return $this->tz; + return $this->timezone; } } diff --git a/resources/views/admin/airports/fields.blade.php b/resources/views/admin/airports/fields.blade.php index 30e5f41a..658bb455 100644 --- a/resources/views/admin/airports/fields.blade.php +++ b/resources/views/admin/airports/fields.blade.php @@ -54,9 +54,9 @@
{{ $errors->first('tz') }}
+ {!! Form::label('timezone', 'Timezone:') !!} + {!! Form::select('timezone', $timezones, null, ['class' => 'select2']); !!} +{{ $errors->first('timezone') }}
{{ $errors->first('name') }}
-{{ $errors->first('tz') }}
+{{ $errors->first('value') }}
{!! Form::close() !!}