Null Safety Image Path

This commit is contained in:
DimazzP 2023-11-06 11:16:47 +07:00
parent 3f4e4990c6
commit 112f68a1c4
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ public function update(Request $request)
$user->nim = $request->input('nim'); $user->nim = $request->input('nim');
$user->semester = $request->input('semester'); $user->semester = $request->input('semester');
$user->angkatan = $request->input('angkatan'); $user->angkatan = $request->input('angkatan');
$user->foto = $imagePath; $user->foto = $imagePath ?? null;
$user->update(); $user->update();
return redirect('/dashboard')->with('success', 'Profile updated successfully1'); return redirect('/dashboard')->with('success', 'Profile updated successfully1');