diff --git a/app/Http/Middleware/PreventBackHistory.php b/app/Http/Middleware/PreventBackHistory.php new file mode 100644 index 0000000..e5b141b --- /dev/null +++ b/app/Http/Middleware/PreventBackHistory.php @@ -0,0 +1,24 @@ +header('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate') + ->header('Pragma', 'no-cache') + ->header('Expires', 'Fri, 01 Jan 1990 00:00:00 GMT'); + } +} diff --git a/app/Http/Requests/Admin/AdditionalRequest.php b/app/Http/Requests/Admin/AdditionalRequest.php index 637e4a2..b6beae3 100644 --- a/app/Http/Requests/Admin/AdditionalRequest.php +++ b/app/Http/Requests/Admin/AdditionalRequest.php @@ -36,8 +36,8 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama additional', - 'harga' => 'harga additional', + 'nama' => 'Nama additional', + 'harga' => 'Harga additional', ]; } diff --git a/app/Http/Requests/Admin/AdminRequest.php b/app/Http/Requests/Admin/AdminRequest.php index a6ae475..efc32a6 100644 --- a/app/Http/Requests/Admin/AdminRequest.php +++ b/app/Http/Requests/Admin/AdminRequest.php @@ -50,12 +50,12 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama lengkap', - 'username' => 'username', - 'email' => 'alamat email', - 'no_wa' => 'nomor WA', - 'role' => 'peran admin', - 'alamat' => 'alamat lengkap', + 'nama' => 'Nama lengkap', + 'username' => 'Username', + 'email' => 'Alamat email', + 'no_wa' => 'Nomor WhatsApp', + 'role' => 'Peran admin', + 'alamat' => 'Alamat', ]; } diff --git a/app/Http/Requests/Admin/BuketRequest.php b/app/Http/Requests/Admin/BuketRequest.php index 70017c2..f3c7882 100644 --- a/app/Http/Requests/Admin/BuketRequest.php +++ b/app/Http/Requests/Admin/BuketRequest.php @@ -49,13 +49,13 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama buket', - 'ukuran' => 'ukuran buket', - 'kategori' => 'kategori buket', - 'harga' => 'harga', - 'request_khusus' => 'request khusus', - 'deskripsi' => 'deskripsi produk', - 'foto' => 'foto produk', + 'nama' => 'Nama buket', + 'ukuran' => 'Ukuran buket', + 'kategori' => 'Kategori buket', + 'harga' => 'Harga buket', + 'request_khusus' => 'Request khusus', + 'deskripsi' => 'Deskripsi buket', + 'foto' => 'Foto buket', ]; } diff --git a/app/Http/Requests/Admin/FotoRequest.php b/app/Http/Requests/Admin/FotoRequest.php index bb2beb2..b34d679 100644 --- a/app/Http/Requests/Admin/FotoRequest.php +++ b/app/Http/Requests/Admin/FotoRequest.php @@ -46,10 +46,11 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama paket', - 'harga' => 'harga paket', - 'durasi' => 'durasi paket', - 'foto' => 'foto paket', + 'nama' => 'Nama paket', + 'harga' => 'Harga paket', + 'durasi' => 'Durasi paket', + 'foto' => 'Foto paket', + 'deskripsi' => 'Deskripsi paket', ]; } diff --git a/app/Http/Requests/Admin/ProfilRequest.php b/app/Http/Requests/Admin/ProfilRequest.php index 812aeed..ec1152f 100644 --- a/app/Http/Requests/Admin/ProfilRequest.php +++ b/app/Http/Requests/Admin/ProfilRequest.php @@ -47,8 +47,11 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'Nama Lengkap', - 'no_wa' => 'Nomor WA', + 'nama' => 'Nama lengkap', + 'no_wa' => 'Nomor WhatsApp', + 'alamat' => 'Alamat', + 'username' => 'Username', + 'email' => 'Email', ]; } } diff --git a/app/Http/Requests/User/BookingFotoRequest.php b/app/Http/Requests/User/BookingFotoRequest.php index 0647f6e..b189d48 100644 --- a/app/Http/Requests/User/BookingFotoRequest.php +++ b/app/Http/Requests/User/BookingFotoRequest.php @@ -44,9 +44,9 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama pemesan', - 'no_wa' => 'nomor WhatsApp', - 'bukti_bayar' => 'bukti pembayaran', + 'nama' => 'Nama pemesan', + 'no_wa' => 'Nomor WhatsApp', + 'bukti_bayar' => 'Bukti pembayaran', ]; } } diff --git a/app/Http/Requests/User/PesanBuketRequest.php b/app/Http/Requests/User/PesanBuketRequest.php index 5dcdaf7..d342fb1 100644 --- a/app/Http/Requests/User/PesanBuketRequest.php +++ b/app/Http/Requests/User/PesanBuketRequest.php @@ -54,12 +54,12 @@ public function messages(): array public function attributes(): array { return [ - 'nama' => 'nama pemesan', - 'no_wa' => 'nomor WhatsApp', - 'tgl_ambil' => 'tanggal pengambilan', - 'waktu_ambil' => 'waktu pengambilan', - 'bukti_bayar' => 'bukti pembayaran', - 'ucapan' => 'kartu ucapan', + 'nama' => 'Nama pemesan', + 'no_wa' => 'Nomor WhatsApp', + 'tgl_ambil' => 'Tanggal pengambilan', + 'waktu_ambil' => 'Waktu pengambilan', + 'bukti_bayar' => 'Bukti pembayaran', + 'ucapan' => 'Kartu ucapan', ]; } } diff --git a/bootstrap/app.php b/bootstrap/app.php index c183276..969b0b6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -6,13 +6,16 @@ return Application::configure(basePath: dirname(__DIR__)) ->withRouting( - web: __DIR__.'/../routes/web.php', - commands: __DIR__.'/../routes/console.php', + web: __DIR__ . '/../routes/web.php', + commands: __DIR__ . '/../routes/console.php', health: '/up', ) - ->withMiddleware(function (Middleware $middleware): void { - // + ->withMiddleware(function (Middleware $middleware) { + // Daftarkan alias di sini + $middleware->alias([ + 'prevent-back' => \App\Http\Middleware\PreventBackHistory::class, + ]); }) - ->withExceptions(function (Exceptions $exceptions): void { + ->withExceptions(function (Exceptions $exceptions) { // })->create(); diff --git a/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php b/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php index 6ba773d..27a4dfd 100644 --- a/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php +++ b/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php @@ -70,7 +70,7 @@ class="form-control @error('durasi') is-invalid @enderror"