feat: add ID photocopy upload field to career application form with validation and database storage

This commit is contained in:
Ümit Tunç
2026-06-01 23:32:52 +03:00
parent 93e45655eb
commit e23ac8c346
4 changed files with 58 additions and 0 deletions
@@ -41,6 +41,7 @@ class CareerController extends Controller
if ($request->type === 'job') {
$rules['nda'] = 'required|file|mimes:pdf|max:5120';
$rules['contract'] = 'required|file|mimes:pdf|max:5120';
$rules['id_photocopy'] = 'required|file|mimes:pdf,jpg,jpeg,png|max:5120'; // Max 5MB
$rules['git_knowledge'] = 'accepted';
$rules['ai_usage'] = 'accepted';
}
@@ -50,6 +51,7 @@ class CareerController extends Controller
$cvPath = $request->file('cv') ? $request->file('cv')->store('cvs', 'public') : null;
$ndaPath = $request->file('nda') ? $request->file('nda')->store('ndas', 'public') : null;
$contractPath = $request->file('contract') ? $request->file('contract')->store('contracts', 'public') : null;
$idPhotocopyPath = $request->file('id_photocopy') ? $request->file('id_photocopy')->store('id_photocopies', 'public') : null;
CareerApplication::create([
'name' => $request->name,
@@ -59,6 +61,7 @@ class CareerController extends Controller
'cv_path' => $cvPath,
'nda_path' => $ndaPath,
'contract_path' => $contractPath,
'id_photocopy_path' => $idPhotocopyPath,
'git_knowledge' => $request->has('git_knowledge'),
'ai_usage' => $request->has('ai_usage'),
'message' => $request->message,