diff --git a/app/Http/Controllers/Admin/AircraftClassController.php b/app/Http/Controllers/Admin/AircraftClassController.php deleted file mode 100644 index e409a6b9..00000000 --- a/app/Http/Controllers/Admin/AircraftClassController.php +++ /dev/null @@ -1,149 +0,0 @@ -aircraftClassRepository = $aircraftClassRepo; - } - - /** - * Display a listing of the AircraftClass. - * - * @param Request $request - * @return Response - */ - public function index(Request $request) - { - $this->aircraftClassRepository->pushCriteria(new RequestCriteria($request)); - $aircraftClasses = $this->aircraftClassRepository->all(); - - return view('admin.aircraft_classes.index') - ->with('aircraftClasses', $aircraftClasses); - } - - /** - * Show the form for creating a new AircraftClass. - * - * @return Response - */ - public function create() - { - return view('admin.aircraft_classes.create'); - } - - /** - * Store a newly created AircraftClass in storage. - * - * @param CreateAircraftClassRequest $request - * - * @return Response - */ - public function store(CreateAircraftClassRequest $request) - { - $input = $request->all(); - $aircraftClass = $this->aircraftClassRepository->create($input); - - Flash::success('Aircraft Class saved successfully.'); - - return redirect(route('admin.aircraftClasses.index')); - } - - /** - * Display the specified AircraftClass. - * - * @param int $id - * - * @return Response - */ - public function show($id) - { - $aircraftClass = $this->aircraftClassRepository->findWithoutFail($id); - - if (empty($aircraftClass)) { - Flash::error('Aircraft Class not found'); - return redirect(route('admin.aircraftClasses.index')); - } - - return view('admin.aircraft_classes.show')->with('aircraftClass', $aircraftClass); - } - - /** - * Show the form for editing the specified AircraftClass. - * - * @param int $id - * - * @return mixed - */ - public function edit($id) - { - $aircraftClass = $this->aircraftClassRepository->findWithoutFail($id); - - if (empty($aircraftClass)) { - Flash::error('Aircraft Class not found'); - return redirect(route('admin.aircraftClasses.index')); - } - - return view('admin.aircraft_classes.edit')->with('aircraftClass', $aircraftClass); - } - - /** - * Update the specified AircraftClass in storage. - * - * @param int $id - * @param UpdateAircraftClassRequest $request - * - * @return Response - */ - public function update($id, UpdateAircraftClassRequest $request) - { - $aircraftClass = $this->aircraftClassRepository->findWithoutFail($id); - - if (empty($aircraftClass)) { - Flash::error('Aircraft Class not found'); - return redirect(route('admin.aircraftClasses.index')); - } - - $aircraftClass = $this->aircraftClassRepository->update($request->all(), $id); - - Flash::success('Aircraft Class updated successfully.'); - - return redirect(route('admin.aircraftClasses.index')); - } - - /** - * Remove the specified AircraftClass from storage. - * - * @param int $id - * - * @return Response - */ - public function destroy($id) - { - $aircraftClass = $this->aircraftClassRepository->findWithoutFail($id); - - if (empty($aircraftClass)) { - Flash::error('Aircraft Class not found'); - return redirect(route('admin.aircraftClasses.index')); - } - - $this->aircraftClassRepository->delete($id); - - Flash::success('Aircraft Class deleted successfully.'); - - return redirect(route('admin.aircraftClasses.index')); - } -} diff --git a/app/Http/Controllers/Admin/AircraftController.php b/app/Http/Controllers/Admin/AircraftController.php index 78aeecc1..5752f7b0 100644 --- a/app/Http/Controllers/Admin/AircraftController.php +++ b/app/Http/Controllers/Admin/AircraftController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\Admin; +use App\Models\Subfleet; use App\Http\Requests\CreateAircraftRequest; use App\Http\Requests\UpdateAircraftRequest; use App\Repositories\AircraftRepository; @@ -54,7 +55,9 @@ class AircraftController extends BaseController */ public function create() { - return view('admin.aircraft.create'); + return view('admin.aircraft.create', [ + 'subfleets' => Subfleet::all()->pluck('name', 'id'), + ]); } /** @@ -84,9 +87,10 @@ class AircraftController extends BaseController $avail_fares = $this->getAvailFares($aircraft); - return view('admin.aircraft.show') - ->with('aircraft', $aircraft) - ->with('avail_fares', $avail_fares); + return view('admin.aircraft.show', [ + 'aircraft' => $aircraft, + 'avail_fares' => $avail_fares, + ]); } /** @@ -101,7 +105,10 @@ class AircraftController extends BaseController return redirect(route('admin.aircraft.index')); } - return view('admin.aircraft.edit')->with('aircraft', $aircraft); + return view('admin.aircraft.edit', [ + 'subfleets' => Subfleet::all()->pluck('name', 'id'), + 'aircraft' => $aircraft, + ]); } /** @@ -147,9 +154,10 @@ class AircraftController extends BaseController $aircraft->refresh(); $avail_fares = $this->getAvailFares($aircraft); - return view('admin.aircraft.fares') - ->with('aircraft', $aircraft) - ->with('avail_fares', $avail_fares); + return view('admin.aircraft.fares', [ + 'aircraft' => $aircraft, + 'avail_fares' => $avail_fares, + ]); } public function fares(Request $request) @@ -158,7 +166,7 @@ class AircraftController extends BaseController $aircraft = $this->aircraftRepository->findWithoutFail($id); if (empty($aircraft)) { - return view('admin.aircraft.fares')->with('fares', []); + return view('admin.aircraft.fares', ['fares' => []]); } $fare_svc = app('App\Services\FareService'); diff --git a/app/Http/Controllers/Admin/SubfleetController.php b/app/Http/Controllers/Admin/SubfleetController.php new file mode 100644 index 00000000..a329d448 --- /dev/null +++ b/app/Http/Controllers/Admin/SubfleetController.php @@ -0,0 +1,154 @@ +subfleetRepo = $subfleetRepo; + } + + /** + * Display a listing of the Subfleet. + * + * @param Request $request + * @return Response + */ + public function index(Request $request) + { + $this->subfleetRepo->pushCriteria(new RequestCriteria($request)); + $subfleets = $this->subfleetRepo->all(); + + return view('admin.subfleets.index', [ + 'subfleets' => $subfleets, + ]); + } + + /** + * Show the form for creating a new Subfleet. + * + * @return Response + */ + public function create() + { + return view('admin.subfleets.create', [ + 'airlines' => Airline::all()->pluck('name', 'id'), + ]); + } + + /** + * Store a newly created Subfleet in storage. + * + * @param CreateSubfleetRequest $request + * + * @return Response + */ + public function store(CreateSubfleetRequest $request) + { + $input = $request->all(); + $subfleet = $this->subfleetRepo->create($input); + + Flash::success('Subfleet saved successfully.'); + return redirect(route('admin.subfleets.index')); + } + + /** + * Display the specified Subfleet. + * + * @param int $id + * + * @return Response + */ + public function show($id) + { + $subfleet = $this->subfleetRepo->findWithoutFail($id); + + if (empty($subfleet)) { + Flash::error('Subfleet not found'); + return redirect(route('admin.subfleets.index')); + } + + return view('admin.subfleets.show', ['subfleet' => $subfleet]); + } + + /** + * Show the form for editing the specified Subfleet. + * + * @param int $id + * + * @return Response + */ + public function edit($id) + { + $subfleet = $this->subfleetRepo->findWithoutFail($id); + + if (empty($subfleet)) { + Flash::error('Subfleet not found'); + return redirect(route('admin.subfleets.index')); + } + + return view('admin.subfleets.edit', [ + 'airlines' => Airline::all()->pluck('name', 'id'), + 'subfleet' => $subfleet, + ]); + } + + /** + * Update the specified Subfleet in storage. + * + * @param int $id + * @param UpdateSubfleetRequest $request + * + * @return Response + */ + public function update($id, UpdateSubfleetRequest $request) + { + $subfleet = $this->subfleetRepo->findWithoutFail($id); + + if (empty($subfleet)) { + Flash::error('Subfleet not found'); + return redirect(route('admin.subfleets.index')); + } + + $subfleet = $this->subfleetRepo->update($request->all(), $id); + + Flash::success('Subfleet updated successfully.'); + return redirect(route('admin.subfleets.index')); + } + + /** + * Remove the specified Subfleet from storage. + * + * @param int $id + * + * @return Response + */ + public function destroy($id) + { + $subfleet = $this->subfleetRepo->findWithoutFail($id); + + if (empty($subfleet)) { + Flash::error('Subfleet not found'); + return redirect(route('admin.subfleets.index')); + } + + $this->subfleetRepo->delete($id); + + Flash::success('Subfleet deleted successfully.'); + return redirect(route('admin.subfleets.index')); + } +} diff --git a/app/Http/Requests/CreateSubfleetRequest.php b/app/Http/Requests/CreateSubfleetRequest.php new file mode 100644 index 00000000..fb25cd32 --- /dev/null +++ b/app/Http/Requests/CreateSubfleetRequest.php @@ -0,0 +1,30 @@ +belongsTo( - 'App\Models\AircraftClass', - 'aircraft_class_id' - ); - } public function fares() { - $r = $this->belongsToMany( + return $this->belongsToMany( 'App\Models\Fare', 'aircraft_fare' )->withPivot('price', 'cost', 'capacity'); - return $r; + } + + public function subfleet() + { + return $this->belongsTo('App\Models\Subfleet', 'subfleet_id'); } } diff --git a/app/Models/AircraftClass.php b/app/Models/AircraftClass.php deleted file mode 100644 index ebe2f7bf..00000000 --- a/app/Models/AircraftClass.php +++ /dev/null @@ -1,45 +0,0 @@ - 'string', - 'name' => 'string', - 'notes' => 'string' - ]; - - /** - * Validation rules - * - * @var array - */ - public static $rules = [ - 'code' => 'required', - 'name' => 'required' - ]; -} diff --git a/app/Models/Fare.php b/app/Models/Fare.php index 3d5152b2..fbf458c2 100644 --- a/app/Models/Fare.php +++ b/app/Models/Fare.php @@ -8,7 +8,6 @@ use Eloquent as Model; * Class Fare * * @package App\Models - * @version June 10, 2017, 4:03 am UTC */ class Fare extends Model { @@ -52,6 +51,10 @@ class Fare extends Model 'name' => 'required', ]; + /** + * any foreign keys + */ + public function aircraft() { return $this->belongsToMany( 'App\Models\Aircraft', diff --git a/app/Models/Rank.php b/app/Models/Rank.php index 1ddc1083..20f08e79 100644 --- a/app/Models/Rank.php +++ b/app/Models/Rank.php @@ -42,4 +42,11 @@ class Rank extends Model public static $rules = [ 'name' => 'unique', ]; + + public function subfleets() { + return $this->belongsToMany( + 'App\Models\Subfleet', + 'subfleet_rank' + )->withPivot('acars_pay', 'manual_pay'); + } } diff --git a/app/Models/Subfleet.php b/app/Models/Subfleet.php new file mode 100644 index 00000000..e291ce3d --- /dev/null +++ b/app/Models/Subfleet.php @@ -0,0 +1,60 @@ + 'integer', + 'name' => 'string', + 'type' => 'string' + ]; + + /** + * Validation rules + * + * @var array + */ + public static $rules = [ + + ]; + + public function airline() + { + return $this->belongsTo('App\Models\Airline', 'airline_id'); + } + + public function ranks() + { + return $this->belongsToMany( + 'App\Models\Ranks', + 'subfleet_rank' + )->withPivot('acars_pay', 'manual_pay'); + } +} diff --git a/app/Repositories/SubfleetRepository.php b/app/Repositories/SubfleetRepository.php new file mode 100644 index 00000000..4807deb7 --- /dev/null +++ b/app/Repositories/SubfleetRepository.php @@ -0,0 +1,24 @@ + 'dollar', + 'fuel_types' => [ + '100LL' => 0, + 'JETA' => 1, + 'MOGAS' => 2, + ], ]; diff --git a/database/migrations/2017_06_09_010621_create_aircrafts_table.php b/database/migrations/2017_06_09_010621_create_aircrafts_table.php index e371883f..d19c2dba 100644 --- a/database/migrations/2017_06_09_010621_create_aircrafts_table.php +++ b/database/migrations/2017_06_09_010621_create_aircrafts_table.php @@ -14,8 +14,10 @@ class CreateAircraftsTable extends Migration $table->string('name'); $table->string('registration')->nullable(); $table->string('tail_number')->nullable(); - $table->string('cargo_capacity')->nullable(); - $table->string('fuel_capacity')->nullable(); + $table->double('cargo_capacity', 19, 2)->nullable(); + $table->double('fuel_capacity', 19, 2)->nullable(); + $table->double('gross_weight', 19, 2)->nullable(); + $table->tinyInteger('fuel_type')->unsigned()->nullable(); $table->boolean('active')->default(true); $table->timestamps(); @@ -23,20 +25,10 @@ class CreateAircraftsTable extends Migration $table->unique('registration'); }); - Schema::create('aircraft_classes', function (Blueprint $table) { - $table->increments('id'); - $table->string('code'); - $table->string('name'); - $table->string('notes')->nullable(); - $table->timestamps(); - - $table->index('code'); - }); } public function down() { Schema::drop('aircraft'); - Schema::drop('aircraft_classes'); } } diff --git a/database/migrations/2017_06_21_165410_create_ranks_table.php b/database/migrations/2017_06_21_165410_create_ranks_table.php index d44a2fc4..bdd63b52 100644 --- a/database/migrations/2017_06_21_165410_create_ranks_table.php +++ b/database/migrations/2017_06_21_165410_create_ranks_table.php @@ -24,14 +24,6 @@ class CreateRanksTable extends Migration $table->unique('name'); }); - - Schema::create('aircraft_rank', function(Blueprint $table) { - $table->increments('id'); - $table->integer('aircraft_id')->unsigned(); - $table->integer('rank_id')->unsigned(); - $table->double('acars_pay', 19, 2)->default(0.0)->unsigned(); - $table->double('manual_pay', 19, 2)->default(0.0)->unsigned(); - }); } /** @@ -42,6 +34,5 @@ class CreateRanksTable extends Migration public function down() { Schema::drop('ranks'); - Schema::drop('aircraft_rank'); } } diff --git a/database/migrations/2017_06_23_011011_create_subfleets_table.php b/database/migrations/2017_06_23_011011_create_subfleets_table.php new file mode 100644 index 00000000..ce6929d5 --- /dev/null +++ b/database/migrations/2017_06_23_011011_create_subfleets_table.php @@ -0,0 +1,45 @@ +increments('id'); + $table->integer('airline_id')->unsigned()->nullable(); + $table->string('name'); + $table->text('type'); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('subfleet_rank', function(Blueprint $table) { + $table->increments('id'); + $table->integer('subfleet_id')->unsigned()->nullable(); + $table->integer('rank_id')->unsigned()->nullable(); + $table->double('acars_pay', 19, 2)->unsigned()->nullable(); + $table->double('manual_pay', 19, 2)->unsigned()->nullable(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('subfleets'); + Schema::drop('subfleet_rank'); + } +} diff --git a/database/seeds/dev.yml b/database/seeds/dev.yml index 08d89cc3..acce8646 100644 --- a/database/seeds/dev.yml +++ b/database/seeds/dev.yml @@ -70,42 +70,27 @@ airports: lat: 51.4775 lon: -0.4614 -# -aircraft_classes: - - id: 1 - code: H - name: Heavy - - id: 2 - code: M - name: Medium - - id: 3 - code: L - name: Light - # aircraft: - id: 1 - aircraft_class_id: 1 icao: B744 name: Boeing 747-400 registration: NC17 tail_number: 17 - id: 2 - aircraft_class_id: 1 icao: B772 name: Boeing 777-200 registration: NC20 tail_number: 20 -aircraft_rank: - - aircraft_id: 1 - rank_id: 1 - - aircraft_id: 1 - rank_id: 2 - acars_pay: 100 - manual_pay: 50 +#aircraft_rank: +# - aircraft_id: 1 +# rank_id: 1 +# - aircraft_id: 1 +# rank_id: 2 +# acars_pay: 100 +# manual_pay: 50 -# fares: - id: 1 code: Y diff --git a/resources/views/admin/aircraft/index.blade.php b/resources/views/admin/aircraft/index.blade.php index 3525f39b..ec548a4d 100644 --- a/resources/views/admin/aircraft/index.blade.php +++ b/resources/views/admin/aircraft/index.blade.php @@ -4,7 +4,7 @@

Aircraft

- Aircraft Classes + Subfleets    Add New Aircraft

diff --git a/resources/views/admin/aircraft_classes/fields.blade.php b/resources/views/admin/aircraft_classes/fields.blade.php deleted file mode 100644 index 5a6cf041..00000000 --- a/resources/views/admin/aircraft_classes/fields.blade.php +++ /dev/null @@ -1,7 +0,0 @@ - - - -
- {!! Form::submit('Save', ['class' => 'btn btn-primary']) !!} - Cancel -
diff --git a/resources/views/admin/aircraft_classes/show_fields.blade.php b/resources/views/admin/aircraft_classes/show_fields.blade.php deleted file mode 100644 index 0c6328ed..00000000 --- a/resources/views/admin/aircraft_classes/show_fields.blade.php +++ /dev/null @@ -1,36 +0,0 @@ - -
- {!! Form::label('id', 'Id:') !!} -

{!! $aircraftClass->id !!}

-
- - -
- {!! Form::label('class', 'Class:') !!} -

{!! $aircraftClass->class !!}

-
- - -
- {!! Form::label('name', 'Name:') !!} -

{!! $aircraftClass->name !!}

-
- - -
- {!! Form::label('notes', 'Notes:') !!} -

{!! $aircraftClass->notes !!}

-
- - -
- {!! Form::label('created_at', 'Created At:') !!} -

{!! $aircraftClass->created_at !!}

-
- - -
- {!! Form::label('updated_at', 'Updated At:') !!} -

{!! $aircraftClass->updated_at !!}

-
- diff --git a/resources/views/admin/aircraft_classes/table.blade.php b/resources/views/admin/aircraft_classes/table.blade.php deleted file mode 100644 index b7228f95..00000000 --- a/resources/views/admin/aircraft_classes/table.blade.php +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - @foreach($aircraftClasses as $aircraftClass) - - - - - - - @endforeach - -
ClassNameNotesAction
{!! $aircraftClass->class !!}{!! $aircraftClass->name !!}{!! $aircraftClass->notes !!} - {!! Form::open(['route' => ['admin.aircraftClasses.destroy', $aircraftClass->id], 'method' => 'delete']) !!} -
- - - {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} -
- {!! Form::close() !!} -
\ No newline at end of file diff --git a/resources/views/admin/aircraft_classes/create.blade.php b/resources/views/admin/subfleets/create.blade.php similarity index 66% rename from resources/views/admin/aircraft_classes/create.blade.php rename to resources/views/admin/subfleets/create.blade.php index 820e9e5e..efd4f7f3 100644 --- a/resources/views/admin/aircraft_classes/create.blade.php +++ b/resources/views/admin/subfleets/create.blade.php @@ -2,9 +2,7 @@ @section('content')
-

- Aircraft Classes -

+

Add Subfleet

@include('adminlte-templates::common.errors') @@ -12,9 +10,9 @@
- {!! Form::open(['route' => 'admin.aircraftClasses.store']) !!} + {!! Form::open(['route' => 'admin.subfleets.store']) !!} - @include('admin.aircraft_classes.fields') + @include('admin.subfleets.fields') {!! Form::close() !!}
diff --git a/resources/views/admin/aircraft_classes/edit.blade.php b/resources/views/admin/subfleets/edit.blade.php similarity index 58% rename from resources/views/admin/aircraft_classes/edit.blade.php rename to resources/views/admin/subfleets/edit.blade.php index f4e33f04..467daf3f 100644 --- a/resources/views/admin/aircraft_classes/edit.blade.php +++ b/resources/views/admin/subfleets/edit.blade.php @@ -2,22 +2,20 @@ @section('content')
-

- Aircraft Class -

+

Edit {!! $subfleet->name !!}

@include('adminlte-templates::common.errors')
- {!! Form::model($aircraftClass, ['route' => ['admin.aircraftClasses.update', $aircraftClass->id], 'method' => 'patch']) !!} + {!! Form::model($subfleet, ['route' => ['admin.subfleets.update', $subfleet->id], 'method' => 'patch']) !!} - @include('admin.aircraft_classes.fields') + @include('admin.subfleets.fields') {!! Form::close() !!}
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/admin/subfleets/fields.blade.php b/resources/views/admin/subfleets/fields.blade.php new file mode 100644 index 00000000..19f2ffb4 --- /dev/null +++ b/resources/views/admin/subfleets/fields.blade.php @@ -0,0 +1,23 @@ + +
+ {!! Form::label('airline_id', 'Airline Id:') !!} + {!! Form::select('airline_id', $airlines, null , ['class' => 'form-control']) !!} +
+ + +
+ {!! Form::label('name', 'Name:') !!} + {!! Form::text('name', null, ['class' => 'form-control']) !!} +
+ + +
+ {!! Form::label('type', 'Type:') !!} + {!! Form::text('type', null, ['class' => 'form-control']) !!} +
+ + +
+ {!! Form::submit('Save', ['class' => 'btn btn-primary']) !!} + Cancel +
diff --git a/resources/views/admin/aircraft_classes/index.blade.php b/resources/views/admin/subfleets/index.blade.php similarity index 66% rename from resources/views/admin/aircraft_classes/index.blade.php rename to resources/views/admin/subfleets/index.blade.php index 86905a4e..bd59a5fd 100644 --- a/resources/views/admin/aircraft_classes/index.blade.php +++ b/resources/views/admin/subfleets/index.blade.php @@ -1,10 +1,10 @@ -@extends('layouts.app') +@extends('admin.app') @section('content')
-

Aircraft Classes

+

Subfleets

- Add New + Add New

@@ -15,7 +15,7 @@
- @include('admin.aircraft_classes.table') + @include('admin.subfleets.table')
diff --git a/resources/views/admin/aircraft_classes/show.blade.php b/resources/views/admin/subfleets/show.blade.php similarity index 55% rename from resources/views/admin/aircraft_classes/show.blade.php rename to resources/views/admin/subfleets/show.blade.php index 1e7edc24..77073699 100644 --- a/resources/views/admin/aircraft_classes/show.blade.php +++ b/resources/views/admin/subfleets/show.blade.php @@ -1,17 +1,15 @@ -@extends('layouts.app') +@extends('admin.app') @section('content')
-

- Aircraft Class -

+

{!! $subfleet->name !!}

- @include('admin.aircraft_classes.show_fields') - Back + @include('admin.subfleets.show_fields') + Back
diff --git a/resources/views/admin/subfleets/show_fields.blade.php b/resources/views/admin/subfleets/show_fields.blade.php new file mode 100644 index 00000000..db519360 --- /dev/null +++ b/resources/views/admin/subfleets/show_fields.blade.php @@ -0,0 +1,31 @@ + + +
+ {!! Form::label('airline_id', 'Airline Id:') !!} +

{!! $subfleet->airline->name !!}

+
+ + +
+ {!! Form::label('name', 'Name:') !!} +

{!! $subfleet->name !!}

+
+ + +
+ {!! Form::label('type', 'Type:') !!} +

{!! $subfleet->type !!}

+
+ + +
+ {!! Form::label('created_at', 'Created At:') !!} +

{!! $subfleet->created_at !!}

+
+ + +
+ {!! Form::label('updated_at', 'Updated At:') !!} +

{!! $subfleet->updated_at !!}

+
+ diff --git a/resources/views/admin/subfleets/table.blade.php b/resources/views/admin/subfleets/table.blade.php new file mode 100644 index 00000000..fa6ea8ab --- /dev/null +++ b/resources/views/admin/subfleets/table.blade.php @@ -0,0 +1,26 @@ + + + + + + + + + @foreach($subfleets as $subfleet) + + + + + + + @endforeach + +
AirlineNameTypeAction
{!! $subfleet->airline->name !!}{!! $subfleet->name !!}{!! $subfleet->type !!} + {!! Form::open(['route' => ['admin.subfleets.destroy', $subfleet->id], 'method' => 'delete']) !!} +
+ + + {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} +
+ {!! Form::close() !!} +
diff --git a/routes/admin.php b/routes/admin.php index a498bf35..cf12c39c 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -12,6 +12,9 @@ Route::group([ Route::resource('aircraftclasses', 'AircraftClassController'); Route::resource('fares', 'FareController'); + # subfleet + Route::resource('subfleets', 'SubfleetController'); + # aircraft and fare associations Route::resource('aircraft', 'AircraftController'); Route::match(['get', 'post', 'put', 'delete'], 'aircraft/{id}/fares', 'AircraftController@fares');