Aplikasi E-Ticketing Dengan Laravel 10 Dan CSS Bootstrap
Disini saya menggunakan Laravel 10 dan XAMPP, langkah pertama yang harus dilakukan sebelum membuat sistemnya adalah dengan menginstall Laravel 10.
Instalasi Laravel 10
Instalasi Laravel 10
composer create-project laravel/laravel:^10.0 example-app
Setelah selesai di install, selanjutnya download GUI Bootstrap untuk Login
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev
Skema Database
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev
Skema Database
Migration tabel user
Migration tabel airline
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
/*Kode di bawah ini hasil modifikasi untuk menambahkan role*/
$table->enum('role', ['super admin', 'admin', 'user'])->default('user');
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Migration tabel airline
Schema::create('airlines', function (Blueprint $table) {
$table->id();
$table->string('name_airline');
});
Migration tabel customer
Schema::create('customers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->string('phone_number');
$table->string('address');
$table->unsignedBigInteger('user_id');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
Migration tabel flight
Schema::create('flights', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('airline_id');
$table->string('no_flight');
$table->string('departure_city');
$table->string('arrival_city');
$table->date('departure_date');
$table->time('departure_time');
$table->date('arrival_date');
$table->time('arrival_time');
$table->integer('seat_availability');
$table->integer('price');
$table->timestamps();
$table->foreign('airline_id')->references('id')->on('airlines')->onDelete('cascade');
});
Migration tabel transaction
Schema::create('transactions', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('customer_id');
$table->unsignedBigInteger('flight_id');
$table->unsignedBigInteger('user_id');
$table->string('no_booking');
$table->integer('total_price');
$table->integer('total_seat');
$table->string('payment_status');
$table->timestamps();
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
$table->foreign('flight_id')->references('id')->on('flights')->onDelete('cascade');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
Selanjutnya kita akan membuat sistem dan ui dari tiap role, yaitu admin, pegawai, dan customer. Tapi sebelum kita membuat form tiap role, kita buat konndisi if else untuk navbar tiap role yang ada pada file layouts.app
<!-- Left Side Of Navbar -->
@if (Auth::check())
@if (Auth::user()->role === 'super admin')
@include('layouts.navAdmin')
@elseif(Auth::user()->role === 'admin')
@include('layouts.navPegawai')
@else
@include('layouts.navCustomer')
@endif
@endif
Admin
navAdmin.blade.php
<ul class="navbar-nav me-auto">
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link {{ (Route::is('input.maskapai')) ? 'active' : '' }}" aria-current="page" href="{{ route('input.maskapai') }}">Input Maskapai</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Tampil
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item {{ (Route::is('tampil.maskapai')) ? 'active' : '' }}" href="{{ route('tampil.maskapai') }}">Tampil Maskapai</a></li>
<li><a class="dropdown-item {{ (Route::is('tampil.maskapai')) ? 'active' : '' }}" href="{{ route('tampil.pegawai') }}">Tampil Pegawai</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item {{ (Route::is('tampil.customer')) ? 'active' : ''}}" href="{{ route('tampil.customer') }}">Tampil Customer</a></li>
</ul>
</li>
</ul>
</div>
</ul>
CONTROLLER
AirlineController.php
<?php
namespace App\Http\Controllers;
use App\Models\Airline;
use Illuminate\Http\Request;
class AirlineController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$airlines = Airline::all();
return view('admin.tampil.tampilMaskapai', compact('airlines'));
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('admin.crud.maskapai');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validated = $request->validate([
'name_airline' => 'required',
]);
$input = new Airline();
$input->name_airline = $request->input('name_airline');
$input->save();
return redirect()->route('tampil.maskapai');
}
/**
* Display the specified resource.
*/
public function show(Airline $airline)
{
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$airlines = Airline::find($id);
return view('admin.crud.edit', compact('airlines'));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
$validate = $request->validated([
'nama_maskapai'=>'required',
]);
$airlines = Airline::find($id);
$airlines->name_airline = $request->input('name_airline');
$airlines->save();
return redirect()->route('tampil.maskapai')->with(['success' => 'Data berhasil diubah!']);
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
$airlines = Airline::find($id);
$airlines->delete();
return redirect()->route('tampil.maskapai')->with(['success' => 'Data berhasil dihapus!']);
}
}
PegawaiController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
class PegawaiController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$pegawais = User::all();
return view('admin.tampil.tampilPegawai', compact('pegawais'));
}
/**
* Show the form for creating a new resource.
*/
public function create($id)
{
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
}
/**
* Display the specified resource.
*/
public function show(string $id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(string $id)
{
$pegawais = User::find($id);
return view('admin.crud.editPegawai', compact('pegawais'));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
$validate = $request->validate([
'name' => 'required',
'role' => 'required',
]);
$pegawais = User::find($id);
$pegawais->name = $request->input('name');
$pegawais->role = $request->input('role');
$pegawais->save();
return redirect()->route('tampil.pegawai');
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
$pegawais = User::find($id);
$pegawais->delete();
return redirect()->route('tampil.pegawai')->with('success', 'Data berhasil diubah!');
}
}
CustomerController.php
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
class CustomerController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$customers = User::all();
return view('admin.tampil.tampilCustomer', compact('customers'));
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show()
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$customers = User::find($id);
return view('admin.crud.editCustomer', compact('customers'));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
$validate = $request->validate([
'name' => 'required',
'role' => 'required',
]);
$customers = User::find($id);
$customers->name = $request->input('name');
$customers->role = $request->input('role');
$customers->save();
return redirect()->route('tampil.customer');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
$customers = User::find($id);
$customers->delete();
return redirect()->route('tampil.customer');
}
}
FORM
inputMaskapai.blade.php
editMaskapai.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('input.proses') }}" method="POST" style="border: 1px solid #ccc; padding: 15px;">
@csrf
<div class="mb-3">
<h3>Form Input Maskapai</h3>
<label for="name_airline" class="form-label py-2">Nama Maskapai</label>
<input type="text" class="form-control" name="name_airline" id="name_airline" placeholder="Masukkan Maskapai">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
@endsection
editMaskapai.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('edit.proses', $airlines->id) }}" method="POST" style="border: 1px solid #ccc; padding: 15px;">
@csrf
<div class="mb-3">
<h3>Form Edit Maskapai</h3>
<label for="name_airline" class="form-label py-2">Nama Maskapai</label>
<input type="text" class="form-control" name="name_airline" id="name_airline" placeholder="Masukkan Maskapai" value="{{ $airlines->name_airline }}">
</div>
<button type="submit" class="btn btn-primary">Edit</button>
</form>
</div>
@endsection
editCustomer.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('edit.customer.proses', $customers->id) }}" method="POST"
style="border: 1px solid #ccc; padding: 15px;">
@csrf
<h3>Form Edit Data Customer</h3>
<div class="mb-3">
<label for="name" class="form-label py-2">Nama Customer</label>
<input type="text" class="form-control" name="name" id="name" placeholder="Nama Customer"
value="{{ $customers->name }}" readonly>
</div>
<select class="form-select my-3" name="role" id="role">
<option disabled selected>Pilih Role</option>
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
<button type="submit" class="btn btn-primary">Edit</button>
</form>
</div>
@endsection
editPegawai.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('edit.pegawai.proses', $pegawais->id) }}" method="POST" style="border: 1px solid #ccc; padding: 15px;">
@csrf
<h3>Form Edit Data Pegawai</h3>
<div class="mb-3">
<label for="name" class="form-label py-2">Nama Pegawai</label>
<input type="text" class="form-control" name="name" id="name" placeholder="Nama Pegawai" value="{{ $pegawais->name }}" readonly>
</div>
<select class="form-select my-3" name="role" id="role">
<option disabled selected >Pilih Role</option>
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
<button type="submit" class="btn btn-primary">Edit</button>
</form>
</div>
@endsection
tampilCustomer.blade.php
@extends('layouts.app')
@section('content')
<table class="table">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Nama Customer</th>
<th scope="col">Role</th>
<th scope="col">Aksi</th>
</tr>
</thead>
@foreach ($customers as $customer)
@if ($customer->role == 'user')
<tbody>
<tr>
<td scope="row">{{ $customer->id }}</td>
<td scope="font-size:15px">{{ $customer->name }}</td>
<td scope="font-size:15px">{{ $customer->role }}</td>
<td style="display: flex;">
<a href="{{ route('edit.customer', $customer->id) }}" class="mr-2">
<button class="btn btn-warning" style="width: 100%;">Edit</button>
</a>
<form action="{{ route('hapus.customer', $customer->id) }}" method="POST" class="d-inline">
@csrf
<button type="submit" class="btn btn-danger mx-2" style="width: 100%;">Hapus</button>
</form>
</td>
</tr>
</tbody>
@endif
@endforeach
</table>
@endsection
tampilMaskapai.blade.php
@extends('layouts.app')
@section('content')
<table class="table">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Nama Maskapai</th>
<th scope="col">Aksi</th>
</tr>
</thead>
<tbody>
@foreach ($airlines as $airline)
<tr>
<td scope="row">{{ $airline->id }}</td>
<td scope="font-size: 15px">{{ $airline->name_airline }}</td>
<td style="display: flex;">
<a href="{{ route('edit.maskapai', $airline->id) }}" class="mr-2">
<button class="btn btn-warning" style="width: 100%;">Edit</button>
</a>
<form action="{{ route('hapus', $airline->id) }}" method="POST" class="d-inline">
@csrf
<button type="submit" class="btn btn-danger mx-2" style="width: 100%;">Hapus</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection
tampilPegawai.blade.php
@extends('layouts.app')
@section('content')
<table class="table">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Nama Pegawai</th>
<th scope="col">Role</th>
<th scope="col">Aksi</th>
</tr>
</thead>
@foreach ($pegawais as $pegawai)
@if ($pegawai->role == 'admin')
<tbody>
<tr>
<td scope="row">{{ $pegawai->id }}</td>
<td scope="font-size:15px">{{ $pegawai->name }}</td>
<td scope="font-size:15px">{{ $pegawai->role }}</td>
<td style="display: flex;">
<a href="{{ route('edit.pegawai', $pegawai->id) }}" class="mr-2">
<button class="btn btn-warning" style="width: 100%;">Edit</button>
</a>
<form action="{{ route('hapus.pegawai', $pegawai->id) }}" method="POST" class="d-inline">
@csrf
<button type="submit" class="btn btn-danger mx-2" style="width: 100%;">Hapus</button>
</form>
</td>
</tr>
</tbody>
@endif
@endforeach
</table>
@endsection
Pegawai Maskapai
navPegawai.blade.php
<ul class="navbar-nav me-auto">
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link {{ (Route::is('input.penerbangan')) ? 'active' : '' }}" aria-current="page" href="{{ route('input.penerbangan') }}">Input Penerbangan</a>
</li>
<li class="nav-item">
<a class="nav-link {{ (Route::is('tampil.penerbangan')) ? 'active' : '' }} " aria-current="page" href="{{ route('tampil.penerbangan') }}">Tampil Penerbangan</a>
</li>
</ul>
</div>
</ul>
CONTROLLER
FlightController.php
<?php
namespace App\Http\Controllers;
use App\Models\Airline;
use App\Models\Flight;
use Illuminate\Http\Request;
class FlightController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$flights = Flight::all();
return view('pegawai.tampil.tampilPenerbangan', compact('flights'));
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$airlines = Airline::all();
return view('pegawai.crud.inputPenerbangan', compact('airlines'));
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validate = $request->validate([
'airline_id' => 'required',
'no_flight' => 'required',
'departure_city' => 'required',
'arrival_city' => 'required',
'departure_date' => 'required',
'departure_time' => 'required',
'arrival_date' => 'required',
'arrival_time' => 'required',
'seat_availability' => 'required',
'price' => 'required',
]);
$input = new Flight();
$input->airline_id = $request->input('airline_id');
$input->no_flight = $request->input('no_flight');
$input->departure_city = $request->input('departure_city');
$input->arrival_city = $request->input('arrival_city');
$input->departure_date = $request->input('departure_date');
$input->departure_time = $request->input('departure_time');
$input->arrival_date = $request->input('arrival_date');
$input->arrival_time = $request->input('arrival_time');
$input->seat_availability = $request->input('seat_availability');
$input->price = $request->input('price');
$input->save();
return redirect()->route('tampil.penerbangan');
}
/**
* Display the specified resource.
*/
public function show(Flight $flight)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Flight $flight, $id)
{
$flights = Flight::find($id);
return view('pegawai.crud.editPenerbangan', compact('flights'));
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Flight $flight)
{
$validate = $request->validate([
'airline_id' => 'required',
'no_flight' => 'required',
'departure_city' => 'required',
'arrival_city' => 'required',
'departure_date' => 'required',
'departure_time' => 'required',
'arrival_date' => 'required',
'arrival_time' => 'required',
'seat_availability' => 'required',
'price' => 'required',
]);
$input = Flight::find('id');
$input->airline_id = $request->input('airline_id');
$input->no_flight = $request->input('no_flight');
$input->departure_city = $request->input('departure_city');
$input->arrival_city = $request->input('arrival_city');
$input->departure_date = $request->input('departure_date');
$input->departure_time = $request->input('departure_time');
$input->arrival_date = $request->input('arrival_date');
$input->arrival_time = $request->input('arrival_time');
$input->seat_availability = $request->input('seat_availability');
$input->price = $request->input('price');
$input->save();
return redirect()->route('tampil.penerbangan');
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Flight $flight, $id)
{
$flights = Flight::find($id);
$flights->destroy();
return redirect()->route('tampil.penerbangan');
}
}
FORM
inputPenerbangan.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('input.penerbangan.proses') }}" method="POST"
style="border: 1px solid #ccc; padding: 15px;">
@csrf
<h3>Form Input Penerbangan</h3>
<label for="airline_id" class="form-label">Nama Maskapai</label>
<select class="form-select my-3" name="airline_id" id="airline_id" value="all">
<option disabled selected>Pilih Maskapai</option>
@foreach ($airlines as $airline)
<option value="{{ $airline->id }}">{{ $airline->name_airline }}</option>
@endforeach
</select>
<div class="mb-2">
<label for="no_flight" class="form-label py-2">Nomor Penerbangan</label>
<input type="text" class="form-control" name="no_flight" id="no_flight" placeholder="Masukkan Nomor Penerbangan">
</div>
<div class="mb-2">
<label for="departure_city" class="form-label py-2">Kota Keberangkatan</label>
<input type="text" class="form-control" name="departure_city" id="departure_city" placeholder="Masukkan Kota Keberangkatan">
</div>
<div class="mb-2">
<label for="arrival_city" class="form-label py-2">Kota Tujuan</label>
<input type="text" class="form-control" name="arrival_city" id="arrival_city" placeholder="Masukkan Kota Tujuan">
</div>
<div class="mb-2">
<label for="departure_date" class="form-label py-2">Tanggal Keberangkatan</label>
<input type="date" class="form-control" name="departure_date" id="departure_date" placeholder="Masukkan Tanggal Keberangkatan">
</div>
<div class="mb-2">
<label for="departure_time" class="form-label py-2">Waktu Keberangkatan</label>
<input type="time" class="form-control" name="departure_time" id="departure_time" placeholder="Masukkan Waktu Keberangkatan">
</div>
<div class="mb-2">
<label for="arrival_date" class="form-label py-2">Tanggal Tiba</label>
<input type="date" class="form-control" name="arrival_date" id="arrival_date" placeholder="Masukkan Tanggal Tiba">
</div>
<div class="mb-2">
<label for="arrival_time" class="form-label py-2">Waktu Tiba</label>
<input type="time" class="form-control" name="arrival_time" id="arrival_time" placeholder="Masukkan Waktu Tiba">
</div>
<div class="mb-2">
<label for="seat_availability" class="form-label py-2">Jumlah Kursi</label>
<input type="number" class="form-control" name="seat_availability" id="seat_availability" placeholder="Masukkan Jumlah Kursi">
</div>
<div class="mb-2">
<label for="price" class="form-label py-2">Harga</label>
<input type="number" class="form-control" name="price" id="price" placeholder="Masukkan Harga">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
@endsection
editPenerbangan.blade.php
@extends('layouts.app')
@section('content')
<div class="py-4">
<form class="rounded" action="{{ route('edit.penerbangan.proses', $flights->id) }}" method="POST"
style="border: 1px solid #ccc; padding: 15px;">
@csrf
<h3>Form Edit Penerbangan</h3>
<label for="airline_id" class="form-label">Nama Maskapai</label>
<select class="form-select my-3" name="airline_id" id="airline_id" value="all">
<option disabled selected>Pilih Maskapai</option>
@foreach ($airlines as $airline)
<option value="{{ $airline->id }}">{{ $airline->name_airline }}</option>
@endforeach
</select>
<div class="mb-2">
<label for="no_flight" class="form-label py-2">Nomor Penerbangan</label>
<input type="text" class="form-control" name="no_flight" id="no_flight" placeholder="Masukkan Nomor Penerbangan">
</div>
<div class="mb-2">
<label for="departure_city" class="form-label py-2">Kota Keberangkatan</label>
<input type="text" class="form-control" name="departure_city" id="departure_city" placeholder="Masukkan Kota Keberangkatan">
</div>
<div class="mb-2">
<label for="arrival_city" class="form-label py-2">Kota Tujuan</label>
<input type="text" class="form-control" name="arrival_city" id="arrival_city" placeholder="Masukkan Kota Tujuan">
</div>
<div class="mb-2">
<label for="departure_date" class="form-label py-2">Tanggal Keberangkatan</label>
<input type="date" class="form-control" name="departure_date" id="departure_date" placeholder="Masukkan Tanggal Keberangkatan">
</div>
<div class="mb-2">
<label for="departure_time" class="form-label py-2">Waktu Keberangkatan</label>
<input type="time" class="form-control" name="departure_time" id="departure_time" placeholder="Masukkan Waktu Keberangkatan">
</div>
<div class="mb-2">
<label for="arrival_date" class="form-label py-2">Tanggal Tiba</label>
<input type="date" class="form-control" name="arrival_date" id="arrival_date" placeholder="Masukkan Tanggal Tiba">
</div>
<div class="mb-2">
<label for="arrival_time" class="form-label py-2">Waktu Tiba</label>
<input type="time" class="form-control" name="arrival_time" id="arrival_time" placeholder="Masukkan Waktu Tiba">
</div>
<div class="mb-2">
<label for="seat_availability" class="form-label py-2">Jumlah Kursi</label>
<input type="number" class="form-control" name="seat_availability" id="seat_availability" placeholder="Masukkan Jumlah Kursi">
</div>
<div class="mb-2">
<label for="price" class="form-label py-2">Harga</label>
<input type="number" class="form-control" name="price" id="price" placeholder="Masukkan Harga">
</div>
<button type="submit" class="btn btn-primary">Edit</button>
</form>
</div>
@endsection
tampilPenerbangan.blade.php
@extends('layouts.app')
@section('content')
<table class="table">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Nama Maskapai</th>
<th scope="col">Nomor Penerbangan</th>
<th scope="col">Kota Keberangkatan</th>
<th scope="col">Kota Tujuan</th>
<th scope="col">Tanggal Keberangkatan</th>
<th scope="col">Waktu Keberangkatan</th>
<th scope="col">Tanggal Tiba</th>
<th scope="col">Waktu Tiba</th>
<th scope="col">Jumlah Kursi</th>
<th scope="col">Harga</th>
<th scope="col">Aksi</th>
</tr>
</thead>
@foreach ($flights as $flight)
<tbody>
<tr>
<td scope="row">{{ $flight->id }}</td>
<td scope="font-size:8px">{{ $flight->airline_id }}</td>
<td scope="font-size:8px">{{ $flight->no_flight }}</td>
<td scope="font-size:8px">{{ $flight->departure_city }}</td>
<td scope="font-size:8px">{{ $flight->arrival_city }}</td>
<td scope="font-size:8px">{{ $flight->departure_date }}</td>
<td scope="font-size:8px">{{ $flight->departure_time }}</td>
<td scope="font-size:8px">{{ $flight->arrival_date }}</td>
<td scope="font-size:8px">{{ $flight->arrival_time }}</td>
<td scope="font-size:8px">{{ $flight->seat_availability }}</td>
<td scope="font-size:8px">{{ $flight->price }}</td>
<td style="display: flex;">
<a href="{{ route('edit.penerbangan', $flight->id) }}" class="mr-2">
<button class="btn btn-warning" style="width: 100%;">Edit</button>
</a>
<form action="{{ route('hapus.penerbangan', $flight->id) }}" method="POST" class="d-inline">
@csrf
<button type="submit" class="btn btn-danger mx-2" style="width: 100%;">Hapus</button>
</form>
</td>
</tr>
</tbody>
@endforeach
</table>
@endsection
konfirmasiPenerbangan.blade.php
MASI KOSONG ADIK ADIK
MASI KOSONG ADIK ADIK
MASI KOSONG ADIK ADIK
MASI KOSONG ADIK ADIK
Komentar
Posting Komentar