Change Airport tz field to timezone

This commit is contained in:
Nabeel Shahzad 2018-02-06 10:59:31 -06:00
parent c6b1a475e9
commit 1cc999a4f9
5 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -90,8 +90,8 @@ class Airport extends BaseModel
/**
* @return string
*/
public function getTimezoneAttribute(): string
public function getTzAttribute(): string
{
return $this->tz;
return $this->timezone;
}
}

View File

@ -54,9 +54,9 @@
</div>
<div class="form-group col-sm-6">
{!! Form::label('tz', 'Timezone:') !!}
{!! Form::select('tz', $timezones, null, ['class' => 'select2']); !!}
<p class="text-danger">{{ $errors->first('tz') }}</p>
{!! Form::label('timezone', 'Timezone:') !!}
{!! Form::select('timezone', $timezones, null, ['class' => 'select2']); !!}
<p class="text-danger">{{ $errors->first('timezone') }}</p>
</div>
</div>

View File

@ -46,8 +46,8 @@ $(document).ready(function() {
$("#" + key).val(value);
if(key === 'tz') {
$("#tz").trigger('change');
if(key === 'timezone') {
$("#timezone").trigger('change');
}
});
});

View File

@ -52,7 +52,7 @@
['type' => 'submit',
'class' => 'btn btn-success btn-s']) !!}
<p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('tz') }}</p>
<p class="text-danger">{{ $errors->first('value') }}</p>
{!! Form::close() !!}
</div>
</div>