@extends('dashboard.layouts.master') @section('title','Edit Profile') @section('content')

Edit Profile

{{ __('backend.dashboard') }} / Edit Profile
{{Form::open(['route'=>['usersUpdate',$Users->id],'method'=>'POST', 'files' => true, 'id' => 'editProfileForm'])}}
{!! Form::text('name',$Users->name, array('placeholder' => 'Enter full name','class' => 'form-control','id'=>'name')) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! Form::email('email',$Users->email, array('placeholder' => 'Enter Login email','class' => 'form-control','id'=>'email')) !!} @if ($errors->has('email')) {{ $errors->first('email') }} @endif
@if($Users->type!=1)
{!! Form::text('phone_number',$Users->phone, array('placeholder' => '','class' => 'form-control','id'=>'phone_number')) !!} @if ($errors->has('phone_number')) {{ $errors->first('phone_number') }} @endif
@endif {{--
--}}
@if($Users->photo != "")
@php $photoPath = $Users->type == 1 ? 'uploads/users/' : 'uploads/customer/'; if (file_exists(public_path($photoPath . $Users->photo))) { $photoUrl = asset($photoPath . $Users->photo); } else { try { if (!empty(env('AWS_BUCKET')) && Storage::disk('s3')->exists($photoPath . $Users->photo)) { $photoUrl = Storage::disk('s3')->url($photoPath . $Users->photo); } else { $photoUrl = asset($photoPath . $Users->photo); } } catch (\Exception $e) { $photoUrl = asset($photoPath . $Users->photo); } } @endphp
{!! Form::hidden('photo_delete','0', array('id'=>'photo_delete')) !!}
@endif @if ($errors->has('profile_picture')) {{ $errors->first('profile_picture') }} @endif {!! __('backend.imagesTypes') !!}
{!! __('backend.cancel') !!}
{{Form::close()}}
@endsection @push('after-scripts') @endpush