Merge branch 'master' of https://github.com/LailaWulandarii/Flo.do into development

This commit is contained in:
LailaWulandarii 2026-01-09 14:55:41 +07:00
commit a3aa02fe9a
138 changed files with 115 additions and 73 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
vendor/
node_modules/
.git/

0
.editorconfig Executable file → Normal file
View File

0
.env.example Executable file → Normal file
View File

0
.gitattributes vendored Executable file → Normal file
View File

0
.gitignore vendored Executable file → Normal file
View File

0
DockerFile → Dockerfile Executable file → Normal file
View File

0
README.md Executable file → Normal file
View File

0
app/Http/Controllers/Admin/AdditionalController.php Executable file → Normal file
View File

0
app/Http/Controllers/Admin/AuthController.php Executable file → Normal file
View File

0
app/Http/Controllers/Admin/BerandaController.php Executable file → Normal file
View File

18
app/Http/Controllers/Admin/BuketController.php Executable file → Normal file
View File

@ -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();

19
app/Http/Controllers/Admin/FotoController.php Executable file → Normal file
View File

@ -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!');

View File

View File

0
app/Http/Controllers/Admin/PesananBuketController.php Executable file → Normal file
View File

0
app/Http/Controllers/Admin/PesananFotoController.php Executable file → Normal file
View File

0
app/Http/Controllers/Admin/ProfilController.php Executable file → Normal file
View File

0
app/Http/Controllers/Controller.php Executable file → Normal file
View File

0
app/Http/Controllers/User/BerandaController.php Executable file → Normal file
View File

View File

@ -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'));

0
app/Models/Additional.php Executable file → Normal file
View File

0
app/Models/BookingFoto.php Executable file → Normal file
View File

4
app/Models/Buket.php Executable file → Normal file
View File

@ -19,8 +19,8 @@ class Buket extends Model
'ucapan',
'harga',
'foto',
'kategori', // Enum
'ukuran', // Enum
'kategori',
'ukuran',
];
public function transaksi()

0
app/Models/DetailAdditional.php Executable file → Normal file
View File

0
app/Models/PaketFoto.php Executable file → Normal file
View File

0
app/Models/Pelanggan.php Executable file → Normal file
View File

0
app/Models/TransaksiBuket.php Executable file → Normal file
View File

0
app/Models/User.php Executable file → Normal file
View File

5
app/Providers/AppServiceProvider.php Executable file → Normal file
View File

@ -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');
}
}
}

0
artisan Executable file → Normal file
View File

0
bootstrap/app.php Executable file → Normal file
View File

0
bootstrap/providers.php Executable file → Normal file
View File

0
composer.json Executable file → Normal file
View File

0
composer.lock generated Executable file → Normal file
View File

0
config/app.php Executable file → Normal file
View File

0
config/auth.php Executable file → Normal file
View File

0
config/cache.php Executable file → Normal file
View File

0
config/database.php Executable file → Normal file
View File

0
config/filesystems.php Executable file → Normal file
View File

0
config/logging.php Executable file → Normal file
View File

0
config/mail.php Executable file → Normal file
View File

0
config/queue.php Executable file → Normal file
View File

0
config/services.php Executable file → Normal file
View File

0
config/session.php Executable file → Normal file
View File

0
database/.gitignore vendored Executable file → Normal file
View File

0
database/factories/UserFactory.php Executable file → Normal file
View File

View File

View File

View File

View File

View File

View File

View File

View File

0
database/seeders/AdditionalSeeder.php Executable file → Normal file
View File

0
database/seeders/BuketSeeder.php Executable file → Normal file
View File

0
database/seeders/DatabaseSeeder.php Executable file → Normal file
View File

12
database/seeders/PaketFotoSeeder.php Executable file → Normal file
View File

@ -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',
],
];

0
database/seeders/PelangganSeeder.php Executable file → Normal file
View File

0
database/seeders/TransaksiSeeder.php Executable file → Normal file
View File

0
database/seeders/UserSeeder.php Executable file → Normal file
View File

19
docker-compose-backup.yml Normal file
View File

@ -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

View File

@ -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
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

0
nginx.conf Executable file → Normal file
View File

0
package-lock.json generated Executable file → Normal file
View File

0
package.json Executable file → Normal file
View File

0
phpunit.xml Executable file → Normal file
View File

0
public/.htaccess Executable file → Normal file
View File

0
public/css/app-dark.css Executable file → Normal file
View File

18
public/css/app.css Executable file → Normal file
View File

@ -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 {

0
public/css/fonts/bootstrap-icons.woff2 Executable file → Normal file
View File

0
public/css/simple-datatables.css Executable file → Normal file
View File

0
public/css/table-datatable.css Executable file → Normal file
View File

0
public/css/user/main.css Executable file → Normal file
View File

0
public/favicon.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

0
public/img/ava.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

0
public/img/beranda/florist1.jpeg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

0
public/img/beranda/florist2.jpeg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

0
public/img/beranda/florist3.jpeg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

0
public/img/beranda/hero-buket.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

0
public/img/beranda/hero-foto.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

0
public/img/invoice.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

0
public/img/logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

0
public/index.php Executable file → Normal file
View File

0
public/js/app.js Executable file → Normal file
View File

0
public/js/ex-simple-datatables.js Executable file → Normal file
View File

0
public/js/simple-datatables.js Executable file → Normal file
View File

0
public/js/user/js/custom.js Executable file → Normal file
View File

0
public/robots.txt Executable file → Normal file
View File

0
resources/css/app.css Executable file → Normal file
View File

0
resources/js/app.js Executable file → Normal file
View File

0
resources/js/bootstrap.js vendored Executable file → Normal file
View File

0
resources/views/admin/kelola-admin/index.blade.php Executable file → Normal file
View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More