Skip to content

Commit

Permalink
T3 Update HouseController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
imtyaz-17 authored Jul 8, 2024
1 parent d802956 commit 274da9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/HouseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function update(Request $request, House $house)
$filename = $request->file('photo')->store('houses');

// TASK: Delete the old file from the storage
if ($house->photo) {
Storage::delete($house->photo);
}

$house->update([
'name' => $request->name,
Expand Down

0 comments on commit 274da9d

Please sign in to comment.