How can I update image in edit view in laravel?
Stefan Izdrail
Founder & Senior Architect · 2026-06-29
Updating Profile Picture in Laravel Edit View
In Laravel, updating profile pictures while editing can be achieved using the correct approach. You need to incorporate some logic in your code and Blade files that handles both uploading new images and keeping existing ones when not necessary. Here is a comprehensive breakdown of how it can work.Blade File
The view for editing an employee profile should include inputs for the personal details as well as the image input with the appropriate code to display the current profile picture. Your Blade file might look like this: ```HTML @extends('layouts.app') @section('content')Edit Employee Profile
@if(Session::get('Success'))
{{ Session::get('Success') }}
@endif
@foreach ($empProfilePic as $empProfilePicture)
@if($employee->id == $empProfilePicture->id)