diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..33485c6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +vendor/ +node_modules/ +.git/ \ No newline at end of file diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.env.example b/.env.example old mode 100755 new mode 100644 diff --git a/.gitattributes b/.gitattributes old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/DockerFile b/Dockerfile old mode 100755 new mode 100644 similarity index 100% rename from DockerFile rename to Dockerfile diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/AdditionalController.php b/app/Http/Controllers/Admin/AdditionalController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/AuthController.php b/app/Http/Controllers/Admin/AuthController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/BerandaController.php b/app/Http/Controllers/Admin/BerandaController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/BuketController.php b/app/Http/Controllers/Admin/BuketController.php old mode 100755 new mode 100644 index 5dc07f7..968ecca --- a/app/Http/Controllers/Admin/BuketController.php +++ b/app/Http/Controllers/Admin/BuketController.php @@ -6,7 +6,7 @@ use App\Models\Buket; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; -use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\Storage; class BuketController extends Controller { @@ -59,10 +59,7 @@ public function store(Request $request) if ($request->hasFile('foto')) { $file = $request->file('foto'); $filename = time() . '_' . $file->getClientOriginalName(); - - $file->move(public_path('img/buket'), $filename); - - $path = 'img/buket/' . $filename; + $path = $file->storeAs('img/buket', $filename, 'public'); } Buket::create([ @@ -121,16 +118,15 @@ public function update(Request $request, string $id) $data = $request->only(['nama', 'ukuran', 'kategori', 'harga', 'request_khusus', 'deskripsi']); if ($request->hasFile('foto')) { - // 1. Hapus foto lama jika ada if ($buket->foto) { - File::delete(public_path($buket->foto)); + Storage::disk('public')->delete($buket->foto); } - // 2. Upload foto baru $file = $request->file('foto'); $filename = time() . '_' . $file->getClientOriginalName(); - $file->move(public_path('img/buket'), $filename); - $data['foto'] = 'img/buket/' . $filename; + $path = $file->storeAs('img/buket', $filename, 'public'); + + $data['foto'] = $path; } $buket->update($data); @@ -143,7 +139,7 @@ public function destroy(string $id) $buket = Buket::findOrFail($id); if ($buket->foto) { - File::delete(public_path($buket->foto)); + Storage::disk('public')->delete($buket->foto); } $buket->delete(); diff --git a/app/Http/Controllers/Admin/FotoController.php b/app/Http/Controllers/Admin/FotoController.php old mode 100755 new mode 100644 index 67ffa7a..d302d8a --- a/app/Http/Controllers/Admin/FotoController.php +++ b/app/Http/Controllers/Admin/FotoController.php @@ -7,8 +7,7 @@ use App\Models\PaketFoto; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; -use Illuminate\Support\Facades\File; - +use Illuminate\Support\Facades\Storage; class FotoController extends Controller { @@ -61,9 +60,7 @@ public function store(Request $request) if ($request->hasFile('foto')) { $file = $request->file('foto'); $filename = time() . '_' . $file->getClientOriginalName(); - // Simpan langsung ke folder public untuk asset() - $file->move(public_path('img/foto'), $filename); - $path = 'img/foto/' . $filename; + $path = $file->storeAs('img/foto', $filename, 'public'); } PaketFoto::create([ @@ -114,15 +111,14 @@ public function update(Request $request, string $id) $data = $request->only(['nama', 'harga', 'durasi', 'deskripsi']); if ($request->hasFile('foto')) { - // Hapus file lama jika ada foto baru yang diunggah if ($paket->foto) { - File::delete(public_path($paket->foto)); + Storage::disk('public')->delete($paket->foto); } $file = $request->file('foto'); $filename = time() . '_' . $file->getClientOriginalName(); - $file->move(public_path('img/foto'), $filename); - $data['foto'] = 'img/foto/' . $filename; + $path = $file->storeAs('img/foto', $filename, 'public'); + $data['foto'] = $path; } $paket->update($data); @@ -135,12 +131,9 @@ public function destroy(string $id) // Cari data berdasarkan primary key id_paket $paket = PaketFoto::where('id_paket', $id)->firstOrFail(); - // 1. Cek dan hapus file foto dari folder public if ($paket->foto) { - File::delete(public_path($paket->foto)); + Storage::disk('public')->delete($paket->foto); } - - // 2. Hapus data dari database $paket->delete(); return redirect()->back()->with('success', 'Paket foto dan filenya berhasil dihapus!'); diff --git a/app/Http/Controllers/Admin/HistoriPesananController.php b/app/Http/Controllers/Admin/HistoriPesananController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/ManajemenAdminController.php b/app/Http/Controllers/Admin/ManajemenAdminController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/PesananBuketController.php b/app/Http/Controllers/Admin/PesananBuketController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/PesananFotoController.php b/app/Http/Controllers/Admin/PesananFotoController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Admin/ProfilController.php b/app/Http/Controllers/Admin/ProfilController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/User/BerandaController.php b/app/Http/Controllers/User/BerandaController.php old mode 100755 new mode 100644 diff --git a/app/Http/Controllers/User/PesanBuketController.php b/app/Http/Controllers/User/PesanBuketController.php index f7243bf..8e0c9b0 100755 --- a/app/Http/Controllers/User/PesanBuketController.php +++ b/app/Http/Controllers/User/PesanBuketController.php @@ -36,7 +36,7 @@ public function index(Request $request) $buket = $query->paginate(8)->withQueryString(); if ($request->ajax()) { - return view('user._list', compact('buket'))->render(); + return view('user.components._list', compact('buket'))->render(); } return view('user/pesan-buket', compact('buket')); diff --git a/app/Models/Additional.php b/app/Models/Additional.php old mode 100755 new mode 100644 diff --git a/app/Models/BookingFoto.php b/app/Models/BookingFoto.php old mode 100755 new mode 100644 diff --git a/app/Models/Buket.php b/app/Models/Buket.php old mode 100755 new mode 100644 index c4b85fc..8970d2c --- a/app/Models/Buket.php +++ b/app/Models/Buket.php @@ -19,8 +19,8 @@ class Buket extends Model 'ucapan', 'harga', 'foto', - 'kategori', // Enum - 'ukuran', // Enum + 'kategori', + 'ukuran', ]; public function transaksi() diff --git a/app/Models/DetailAdditional.php b/app/Models/DetailAdditional.php old mode 100755 new mode 100644 diff --git a/app/Models/PaketFoto.php b/app/Models/PaketFoto.php old mode 100755 new mode 100644 diff --git a/app/Models/Pelanggan.php b/app/Models/Pelanggan.php old mode 100755 new mode 100644 diff --git a/app/Models/TransaksiBuket.php b/app/Models/TransaksiBuket.php old mode 100755 new mode 100644 diff --git a/app/Models/User.php b/app/Models/User.php old mode 100755 new mode 100644 diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php old mode 100755 new mode 100644 index e31cb23..7a14d6d --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -4,6 +4,7 @@ use Carbon\Carbon; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\URL; class AppServiceProvider extends ServiceProvider { @@ -25,5 +26,9 @@ public function boot() // Opsional: Set timezone jika diperlukan date_default_timezone_set('Asia/Jakarta'); + + if (config('app.env') === 'production') { + URL::forceScheme('https'); + } } } diff --git a/artisan b/artisan old mode 100755 new mode 100644 diff --git a/bootstrap/app.php b/bootstrap/app.php old mode 100755 new mode 100644 diff --git a/bootstrap/providers.php b/bootstrap/providers.php old mode 100755 new mode 100644 diff --git a/composer.json b/composer.json old mode 100755 new mode 100644 diff --git a/composer.lock b/composer.lock old mode 100755 new mode 100644 diff --git a/config/app.php b/config/app.php old mode 100755 new mode 100644 diff --git a/config/auth.php b/config/auth.php old mode 100755 new mode 100644 diff --git a/config/cache.php b/config/cache.php old mode 100755 new mode 100644 diff --git a/config/database.php b/config/database.php old mode 100755 new mode 100644 diff --git a/config/filesystems.php b/config/filesystems.php old mode 100755 new mode 100644 diff --git a/config/logging.php b/config/logging.php old mode 100755 new mode 100644 diff --git a/config/mail.php b/config/mail.php old mode 100755 new mode 100644 diff --git a/config/queue.php b/config/queue.php old mode 100755 new mode 100644 diff --git a/config/services.php b/config/services.php old mode 100755 new mode 100644 diff --git a/config/session.php b/config/session.php old mode 100755 new mode 100644 diff --git a/database/.gitignore b/database/.gitignore old mode 100755 new mode 100644 diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php old mode 100755 new mode 100644 diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150422_create_bukets_table.php b/database/migrations/2025_12_26_150422_create_bukets_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150455_create_paket_fotos_table.php b/database/migrations/2025_12_26_150455_create_paket_fotos_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150512_create_additionals_table.php b/database/migrations/2025_12_26_150512_create_additionals_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150527_create_pelanggans_table.php b/database/migrations/2025_12_26_150527_create_pelanggans_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150607_create_transaksi_bukets_table.php b/database/migrations/2025_12_26_150607_create_transaksi_bukets_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150621_create_booking_fotos_table.php b/database/migrations/2025_12_26_150621_create_booking_fotos_table.php old mode 100755 new mode 100644 diff --git a/database/migrations/2025_12_26_150637_create_detail_additionals_table.php b/database/migrations/2025_12_26_150637_create_detail_additionals_table.php old mode 100755 new mode 100644 diff --git a/database/seeders/AdditionalSeeder.php b/database/seeders/AdditionalSeeder.php old mode 100755 new mode 100644 diff --git a/database/seeders/BuketSeeder.php b/database/seeders/BuketSeeder.php old mode 100755 new mode 100644 diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php old mode 100755 new mode 100644 diff --git a/database/seeders/PaketFotoSeeder.php b/database/seeders/PaketFotoSeeder.php old mode 100755 new mode 100644 index 48dce51..83c64e3 --- a/database/seeders/PaketFotoSeeder.php +++ b/database/seeders/PaketFotoSeeder.php @@ -28,42 +28,42 @@ public function run(): void 'nama' => 'Group', 'harga' => 80000, 'deskripsi' => 'Untuk 3-5 orang, 15 menit sesi foto sepuasnya, 5 menit sesi pilih foto, 3 lembar print out foto ukutan 4R.', - 'foto' => 'img/foto/1767368465_grup.jpeg', + 'foto' => 'img/foto/grup.jpeg', 'durasi' => '15', ], [ 'nama' => 'Pas Foto Paket 1', 'harga' => 25000, 'deskripsi' => 'Sesi pas foto untuk 1 orang dengan 8x shoot fotografer. Termasuk 1 file foto edit dan bebas request warna background. Paket cetak: ukuran 2x3 (12 lembar).', - 'foto' => 'img/foto/1767368572_pas-foto.jpg', + 'foto' => 'img/foto/pas-foto.jpg', 'durasi' => '0', ], [ 'nama' => 'Pas Foto Paket 2', 'harga' => 25000, 'deskripsi' => 'Sesi pas foto untuk 1 orang dengan 8x shoot fotografer. Termasuk 1 file foto edit dan bebas request warna background. Paket cetak: ukuran 3x4 (8 lembar).', - 'foto' => 'img/foto/1767368572_pas-foto.jpg', + 'foto' => 'img/foto/pas-foto.jpg', 'durasi' => '0', ], [ 'nama' => 'Pas Foto Paket 3', 'harga' => 25000, 'deskripsi' => 'Sesi pas foto untuk 1 orang dengan 8x shoot fotografer. Termasuk 1 file foto edit dan bebas request warna background. Paket cetak: ukuran 4x6 (4 lembar).', - 'foto' => 'img/foto/1767368572_pas-foto.jpg', + 'foto' => 'img/foto/pas-foto.jpg', 'durasi' => '0', ], [ 'nama' => 'Pas Foto Paket 4', 'harga' => 25000, 'deskripsi' => 'Sesi pas foto untuk 1 orang dengan 8x shoot fotografer. Termasuk 1 file foto edit dan bebas request warna background. Paket cetak campur: ukuran 4x6 (2 lembar), 3x4 (3 lembar), dan 2x3 (4 lembar).', - 'foto' => 'img/foto/1767368572_pas-foto.jpg', + 'foto' => 'img/foto/pas-foto.jpg', 'durasi' => '0', ], [ 'nama' => 'Background Biru', 'harga' => 95000, 'deskripsi' => 'Paket foto untuk 2 orang. Termasuk: Max 10x shoot fotografer (formal), 10 menit self-photo (bebas), dan semua file dikirim via Google Drive. Cetak 2 Foto (4R) terdiri dari: (2x3) 8 lembar, (3x4) 6 lembar, dan (4x6) 4 lembar.', - 'foto' => 'img/foto/1766833654_latar biru 1.jpeg', + 'foto' => 'img/foto/latar-biru.jpeg', 'durasi' => '20', ], ]; diff --git a/database/seeders/PelangganSeeder.php b/database/seeders/PelangganSeeder.php old mode 100755 new mode 100644 diff --git a/database/seeders/TransaksiSeeder.php b/database/seeders/TransaksiSeeder.php old mode 100755 new mode 100644 diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php old mode 100755 new mode 100644 diff --git a/docker-compose-backup.yml b/docker-compose-backup.yml new file mode 100644 index 0000000..5f311ca --- /dev/null +++ b/docker-compose-backup.yml @@ -0,0 +1,19 @@ +services: + app: + image: serversideup/php:8.2-fpm-nginx + container_name: flodo-app + restart: unless-stopped + network_mode: host + environment: + - APP_ENV=production + - APP_DEBUG=false + - WEBROOT=/var/www/html/public + - PHP_OPEN_BASEDIR=/var/www/html/:/tmp/:/usr/bin/ + - PUID=33 + - PGID=33 + - PORT=8081 + - FPM_PORT=9001 + volumes: + - /www/wwwroot/flodo.web.id:/var/www/html:ro + - /www/wwwroot/flodo.web.id/storage:/var/www/html/storage:rw + - /www/wwwroot/flodo.web.id/bootstrap/cache:/var/www/html/bootstrap/cache:rw \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8ebf122..5ce2c8a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,21 @@ -version: '3.8' - services: app: - container_name: flodo-container - build: . + image: serversideup/php:8.2-fpm-nginx + container_name: flodo-app restart: unless-stopped - ports: - - "8081:80" - extra_hosts: - - "host.docker.internal:host-gateway" - env_file: - - .env \ No newline at end of file + network_mode: host + environment: + - APP_ENV=production + - APP_DEBUG=false + - WEBROOT=/var/www/html/public + - PHP_OPEN_BASEDIR=/var/www/html/:/tmp/:/usr/bin/ + - PUID=33 + - PGID=33 + - PORT=8081 + - FPM_PORT=9001 + volumes: + - /www/wwwroot/flodo.web.id:/var/www/html:ro + - /www/wwwroot/flodo.web.id/storage:/var/www/html/storage:rw + - /www/wwwroot/flodo.web.id/bootstrap/cache:/var/www/html/bootstrap/cache:rw + + \ No newline at end of file diff --git a/nginx.conf b/nginx.conf old mode 100755 new mode 100644 diff --git a/package-lock.json b/package-lock.json old mode 100755 new mode 100644 diff --git a/package.json b/package.json old mode 100755 new mode 100644 diff --git a/phpunit.xml b/phpunit.xml old mode 100755 new mode 100644 diff --git a/public/.htaccess b/public/.htaccess old mode 100755 new mode 100644 diff --git a/public/css/app-dark.css b/public/css/app-dark.css old mode 100755 new mode 100644 diff --git a/public/css/app.css b/public/css/app.css old mode 100755 new mode 100644 index 8d99823..e59664c --- a/public/css/app.css +++ b/public/css/app.css @@ -23850,7 +23850,15 @@ .page-item:last-child { margin-left: .4rem } -.table td, +.table thead th { + vertical-align: middle !important; + text-align: center !important; + /* Ini yang bikin rata tengah */ + font-size: var(--text-sm); + font-weight: var(--fw-medium); +} + +/* .table td, .dataTable-table td { vertical-align: middle !important; font-size: var(--text-sm); @@ -23858,12 +23866,18 @@ .dataTable-table td { } +.table .table-striped thead th { + vertical-align: middle !important; + font-size: var(--text-sm); + font-weight: var(--fw-medium); +} + .table thead th, .dataTable-table thead th { vertical-align: middle !important; font-size: var(--text-sm); font-weight: var(--fw-medium); -} +} */ .table:not(.table-borderless) thead th, .dataTable-table:not(.table-borderless) thead th { diff --git a/public/css/fonts/bootstrap-icons.woff2 b/public/css/fonts/bootstrap-icons.woff2 old mode 100755 new mode 100644 diff --git a/public/css/simple-datatables.css b/public/css/simple-datatables.css old mode 100755 new mode 100644 diff --git a/public/css/table-datatable.css b/public/css/table-datatable.css old mode 100755 new mode 100644 diff --git a/public/css/user/main.css b/public/css/user/main.css old mode 100755 new mode 100644 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100755 new mode 100644 diff --git a/public/img/ava.png b/public/img/ava.png old mode 100755 new mode 100644 diff --git a/public/img/beranda/florist1.jpeg b/public/img/beranda/florist1.jpeg old mode 100755 new mode 100644 diff --git a/public/img/beranda/florist2.jpeg b/public/img/beranda/florist2.jpeg old mode 100755 new mode 100644 diff --git a/public/img/beranda/florist3.jpeg b/public/img/beranda/florist3.jpeg old mode 100755 new mode 100644 diff --git a/public/img/beranda/hero-buket.jpg b/public/img/beranda/hero-buket.jpg old mode 100755 new mode 100644 diff --git a/public/img/beranda/hero-foto.jpg b/public/img/beranda/hero-foto.jpg old mode 100755 new mode 100644 diff --git a/public/img/buket/mawar-merah-premium.jpg b/public/img/buket/mawar-merah-premium.jpg new file mode 100755 index 0000000..95a7171 Binary files /dev/null and b/public/img/buket/mawar-merah-premium.jpg differ diff --git a/public/img/invoice.jpg b/public/img/invoice.jpg old mode 100755 new mode 100644 diff --git a/public/img/logo.png b/public/img/logo.png old mode 100755 new mode 100644 diff --git a/public/index.php b/public/index.php old mode 100755 new mode 100644 diff --git a/public/js/app.js b/public/js/app.js old mode 100755 new mode 100644 diff --git a/public/js/ex-simple-datatables.js b/public/js/ex-simple-datatables.js old mode 100755 new mode 100644 diff --git a/public/js/simple-datatables.js b/public/js/simple-datatables.js old mode 100755 new mode 100644 diff --git a/public/js/user/js/custom.js b/public/js/user/js/custom.js old mode 100755 new mode 100644 diff --git a/public/robots.txt b/public/robots.txt old mode 100755 new mode 100644 diff --git a/resources/css/app.css b/resources/css/app.css old mode 100755 new mode 100644 diff --git a/resources/js/app.js b/resources/js/app.js old mode 100755 new mode 100644 diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js old mode 100755 new mode 100644 diff --git a/resources/views/admin/kelola-admin/index.blade.php b/resources/views/admin/kelola-admin/index.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/kelola-admin/partials/modal-create.blade.php b/resources/views/admin/kelola-admin/partials/modal-create.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/kelola-admin/partials/modal-delete.blade.php b/resources/views/admin/kelola-admin/partials/modal-delete.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/kelola-admin/partials/modal-edit.blade.php b/resources/views/admin/kelola-admin/partials/modal-edit.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/kelola-admin/partials/modal-show.blade.php b/resources/views/admin/kelola-admin/partials/modal-show.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/login.blade.php b/resources/views/admin/login.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/paket-foto/index.blade.php b/resources/views/admin/paket-foto/index.blade.php old mode 100755 new mode 100644 diff --git a/resources/views/admin/paket-foto/partials/modal-create-additional.blade.php b/resources/views/admin/paket-foto/partials/modal-create-additional.blade.php old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index ee11b62..169b1d6 --- a/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php +++ b/resources/views/admin/paket-foto/partials/modal-create-foto.blade.php @@ -15,9 +15,9 @@
Dalam Rupiah
- @error('nama') + @error('harga')Dalam Menit
- @error('nama') + @error('durasi')| No. | Nama Buket | Deskripsi | Harga | Foto | -Aksi | +Aksi |
|---|