laravelEcomm/resources/views/profile.blade.php

73 lines
2.8 KiB
PHP
Raw Normal View History

<x-header />
<!-- Contact Section Begin -->
<section class="contact spad">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 mx-auto">
<div class="section-title">
<h2>Update Account</h2>
</div>
<div class="contact__form">
@if (session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="alert alert-danger">
{{ session('error') }}
</div>
@endif
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<img src="{{ 'uploads/profiles/' . $user->picture }}" class=" mx-auto d-block mb-2 rounded-circle"
alt="profile picture" width="100px" height="100px">
<form action="{{ URL::to('updateUser') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-lg-12">
<input type="text" name="name" value="{{ $user->name }}" id="name"
placeholder="Name" required>
</div>
<div class="col-lg-12">
<input type="email" name="email" value="{{ $user->email }}" id="email"
placeholder="Email" readonly required>
</div>
<div class="col-lg-12">
<input type="file" name="file">
</div>
<div class="col-lg-12">
<input type="password" name="password" value="{{ $user->password }}" id="password"
placeholder="Password">
</div>
<div class="col-lg-12">
<button type="submit" class="site-btn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Contact Section End -->
<!-- Footer Section Begin -->
<x-footer />
<!-- Footer Section End -->