diff --git a/app/Http/Controllers/Admin/FlightController.php b/app/Http/Controllers/Admin/FlightController.php index 9202463c..c4d4fc38 100644 --- a/app/Http/Controllers/Admin/FlightController.php +++ b/app/Http/Controllers/Admin/FlightController.php @@ -101,6 +101,7 @@ class FlightController extends BaseController $avail_subfleets = $this->getAvailSubfleets($flight); return view('admin.flights.show', [ 'flight' => $flight, + 'fields' => $flight->fields(), 'avail_subfleets' => $avail_subfleets, ]); } @@ -124,6 +125,7 @@ class FlightController extends BaseController $avail_subfleets = $this->getAvailSubfleets($flight); return view('admin.flights.edit', [ 'flight' => $flight, + 'fields' => $flight->fields(), 'avail_subfleets' => $avail_subfleets, ]); } diff --git a/database/migrations/2017_06_10_040335_create_fares_table.php b/database/migrations/2017_06_10_040335_create_fares_table.php index 2cb6dbab..46c86bae 100644 --- a/database/migrations/2017_06_10_040335_create_fares_table.php +++ b/database/migrations/2017_06_10_040335_create_fares_table.php @@ -23,8 +23,6 @@ class CreateFaresTable extends Migration $table->string('notes')->nullable(); $table->boolean('active')->default(true); $table->timestamps(); - - $table->primary('id'); }); } diff --git a/database/migrations/2017_06_17_214650_create_flights_table.php b/database/migrations/2017_06_17_214650_create_flights_table.php index 40b628b2..49f00e1d 100644 --- a/database/migrations/2017_06_17_214650_create_flights_table.php +++ b/database/migrations/2017_06_17_214650_create_flights_table.php @@ -25,7 +25,7 @@ class CreateFlightsTable extends Migration $table->text('route')->nullable(); $table->text('dpt_time', 10)->nullable(); $table->text('arr_time', 10)->nullable(); - $table->double('flight_time', 19, 2)->unsigned(); + $table->double('flight_time', 19, 2)->unsigned()->nullable(); $table->text('notes')->nullable(); $table->boolean('active')->default(true); $table->timestamps(); diff --git a/database/seeds/dev.yml b/database/seeds/dev.yml index 6f94a6f1..d2d116a4 100644 --- a/database/seeds/dev.yml +++ b/database/seeds/dev.yml @@ -153,6 +153,12 @@ flights: arr_airport_id: 2 route: KAUS KJFK +flight_fields: + - id: 1 + flight_id: 1 + name: terminal + value: B + pireps: - user_id: 1 flight_id: 1 diff --git a/resources/views/admin/flights/table.blade.php b/resources/views/admin/flights/table.blade.php index 32bc2cbf..1b778c13 100644 --- a/resources/views/admin/flights/table.blade.php +++ b/resources/views/admin/flights/table.blade.php @@ -36,7 +36,7 @@ {!! Form::open(['route' => ['admin.flights.destroy', $flight->id], 'method' => 'delete']) !!}
- + {{----}} {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}