@extends('layouts.admin', [ 'page_header' => 'Your Profile', 'dash' => '', 'quiz' => '', 'users' => '', 'questions' => '', 'top_re' => '', 'all_re' => '', 'sett' => '' ]) @section('content') @if ($auth) @if ($auth->role == 'A')
{!! Form::model($auth, ['files' => true,'method' => 'PATCH', 'action' => ['UsersController@update', $auth->id]]) !!}
{!! Form::label('name', 'Name') !!} * {!! Form::text('name', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Enter Your Name']) !!} {{ $errors->first('name') }}
{!! Form::label('email', 'Email address') !!} * {!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'eg: info@example.com', 'required' => 'required']) !!} {{ $errors->first('email') }}
{!! Form::label('password', 'Password') !!} * {!! Form::password('password', ['class' => 'form-control', 'placeholder'=>'Change Your Password']) !!} {{ $errors->first('password') }}
{!! Form::label('role', 'Role') !!} * {!! Form::select('role', ['S' => 'Student', 'A'=>'Administrator'], null, ['class' => 'form-control select2', 'required' => 'required']) !!} {{ $errors->first('role') }}
{!! Form::label('mobile', 'Mobile No.') !!} {!! Form::text('mobile', null, ['class' => 'form-control', 'placeholder' => 'eg: +91-123-456-7890']) !!} {{ $errors->first('mobile') }}
{!! Form::label('city', 'Enter City') !!} {!! Form::text('city', null, ['class' => 'form-control', 'placeholder'=>'Enter Your City']) !!} {{ $errors->first('city') }}
{!! Form::label('address', 'Address') !!} {!! Form::textarea('address', null, ['class' => 'form-control', 'rows'=>'5', 'placeholder' => 'Enter Your Address']) !!} {{ $errors->first('address') }}
@if($auth->image !="") user profile @else user profile @endif

{!! Form::submit('Update', ['class' => 'btn btn-wave btn-block']) !!}
{!! Form::close() !!}
@elseif ($auth->role == 'S')
{!! Form::model($auth, ['files' => true, 'method' => 'PATCH', 'action' => ['UsersController@update', $auth->id]]) !!}
{!! Form::label('name', 'Name') !!} {!! Form::text('name', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Enter Your Name']) !!} {{ $errors->first('name') }}
{!! Form::label('email', 'Email address') !!} {!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'eg: info@example.com', 'required' => 'required']) !!} {{ $errors->first('email') }}
{!! Form::label('password', 'Password') !!} {!! Form::password('password', ['class' => 'form-control', 'placeholder'=>'Change Your Password']) !!} {{ $errors->first('password') }}
{!! Form::label('mobile', 'Mobile No.') !!} {!! Form::text('mobile', null, ['class' => 'form-control', 'placeholder' => 'eg: +91-123-456-7890']) !!} {{ $errors->first('mobile') }}
{!! Form::label('city', 'Enter City') !!} {!! Form::text('city', null, ['class' => 'form-control', 'placeholder'=>'Enter Your City']) !!} {{ $errors->first('city') }}
{!! Form::label('address', 'Address') !!} {!! Form::textarea('address', null, ['class' => 'form-control', 'rows'=>'8', 'placeholder' => 'Enter Your Address']) !!} {{ $errors->first('address') }}
@if($auth->image !="") @else @endif

{!! Form::submit('Update', ['class' => 'btn btn-wave btn-block']) !!}
{!! Form::close() !!}
@endif @endif @endsection