Tag : laravel

$projectphotos = []; $photocount = 1; if ($request->hasFile(‘project_photo_url’)) { foreach ($request->file(‘project_photo_url’) as $file) { $currentDateTime = now()->format(‘YmdHis’); $filename = $initials . “_” . $photocount . ‘_’ . $currentDateTime . ‘.’ . $file->getClientOriginalExtension(); // Buat nama unik untuk setiap file $file->storeAs(‘public/project/photos’, $filename); // Simpan file ke direktori yang diinginkan $photocount++; $projectphotos[] = $filename; // Simpan nama ..

Read more