Started a flight view
This commit is contained in:
@@ -17,12 +17,13 @@ class FlightProfileController extends Controller
|
||||
->with([
|
||||
'departureAirport',
|
||||
'arrivalAirport',
|
||||
'airline',
|
||||
'airline.country',
|
||||
'aircraft',
|
||||
'seatType',
|
||||
'flightReason',
|
||||
'flightClass',
|
||||
])
|
||||
->orderBy('departure_date')
|
||||
->get();
|
||||
|
||||
return Inertia::render('FlightProfile', [
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Airline extends Model
|
||||
{
|
||||
@@ -25,4 +26,9 @@ class Airline extends Model
|
||||
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public function country(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user