commit
6f745091de
@ -50,7 +50,7 @@ class AirlinesController extends BaseController
|
|||||||
|
|
||||||
Flash::success('Airlines saved successfully.');
|
Flash::success('Airlines saved successfully.');
|
||||||
|
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +66,7 @@ class AirlinesController extends BaseController
|
|||||||
|
|
||||||
if (empty($airlines)) {
|
if (empty($airlines)) {
|
||||||
Flash::error('Airlines not found');
|
Flash::error('Airlines not found');
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('admin.airlines.show')->with('airlines', $airlines);
|
return view('admin.airlines.show')->with('airlines', $airlines);
|
||||||
@ -85,7 +85,7 @@ class AirlinesController extends BaseController
|
|||||||
|
|
||||||
if (empty($airlines)) {
|
if (empty($airlines)) {
|
||||||
Flash::error('Airlines not found');
|
Flash::error('Airlines not found');
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('admin.airlines.edit')->with('airlines', $airlines);
|
return view('admin.airlines.edit')->with('airlines', $airlines);
|
||||||
@ -105,14 +105,14 @@ class AirlinesController extends BaseController
|
|||||||
|
|
||||||
if (empty($airlines)) {
|
if (empty($airlines)) {
|
||||||
Flash::error('Airlines not found');
|
Flash::error('Airlines not found');
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$airlines = $this->airlineRepo->update($request->all(), $id);
|
$airlines = $this->airlineRepo->update($request->all(), $id);
|
||||||
|
|
||||||
Flash::success('Airlines updated successfully.');
|
Flash::success('Airlines updated successfully.');
|
||||||
|
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,13 +128,13 @@ class AirlinesController extends BaseController
|
|||||||
|
|
||||||
if (empty($airlines)) {
|
if (empty($airlines)) {
|
||||||
Flash::error('Airlines not found');
|
Flash::error('Airlines not found');
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->airlineRepo->delete($id);
|
$this->airlineRepo->delete($id);
|
||||||
|
|
||||||
Flash::success('Airlines deleted successfully.');
|
Flash::success('Airlines deleted successfully.');
|
||||||
|
|
||||||
return redirect(route('airlines.index'));
|
return redirect(route('admin.airlines.index'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class Airline extends Model
|
|||||||
'fuel_100ll_cost' => 'double',
|
'fuel_100ll_cost' => 'double',
|
||||||
'fuel_jeta_cost' => 'double',
|
'fuel_jeta_cost' => 'double',
|
||||||
'fuel_mogas_cost' => 'double',
|
'fuel_mogas_cost' => 'double',
|
||||||
'active' => 'boolean',
|
'active' => 'integer',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
{!! Form::label('active', 'Active:') !!}
|
{!! Form::label('active', 'Active:') !!}
|
||||||
<label class="checkbox-inline">
|
<label class="checkbox-inline">
|
||||||
{!! Form::hidden('active', false) !!}
|
{!! Form::hidden('active', 0, false) !!}
|
||||||
{!! Form::checkbox('active', 'True', null) !!} 1
|
{!! Form::checkbox('active', 1, null) !!}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user