@extends('layouts.app') @section('content')

{{ ($senddata->id != '') ? 'Edit' : 'Add' }} User

{!! Form::model($senddata, ['route' => $route, 'method' => $method, 'id'=>'user_form' , 'files' => true,'class' => 'form']) !!}
{{ Form::text('name',($senddata->id != '') ? $senddata->name : old('name'),['class' => 'form-control','data-error' => 'Enter Name','placeholder'=>'Enter Name'] ) }}
@if($senddata->id == '')
{{ Form::text('email',($senddata->id != '') ? $senddata->email : old('email'),['class' => 'form-control','data-error' => 'Enter Email','placeholder'=>'Enter Email'] ) }}
@else
{{ Form::text('email',($senddata->id != '') ? $senddata->email : old('email'),['class' => 'form-control','data-error' => 'Enter Email','placeholder'=>'Enter Email','readonly'=>true] ) }}
@endif
{{ Form::input('number','mobile_number',($senddata->id != '') ? $senddata->mobile : old('mobile'),['class' => 'form-control','data-error' => 'Enter Contact Number','placeholder'=>'Enter Contact Number','maxlength' => 15,'minlength' => 8] ) }}
{!! Form::select('role_id',$roles,($senddata->id != '') ? $user->roles->first()->id : '',['class' => 'form-control','placeholder'=>'Please Select Role']) !!}
@if($senddata->id == '')
{{ Form::password('password',['class' => 'form-control','data-error' => 'Enter Password','placeholder'=>'Enter Password','id' => 'password' ] ) }}
{{ Form::password('confirm_password',['class' => 'form-control','data-error' => 'Enter Password','placeholder'=>'Enter Password' ] ) }}
@endif @if ($senddata->id)
{!! Form::select('status',['1'=>'Active','0'=>'In Active'],($senddata->id != '') ? $senddata->status : '',['class' => 'form-control']) !!}
@endif
Cancel
{!! Form::close() !!}
@endsection @section('javascript') @endsection