@extends('layouts.main_frontend') @php $title = 'Add User'; $name = $email = $mobile = $country_code = $unit = $level = $status = ''; if(!empty($user)){ $title='Edit User'; $name = $user->name; $email = $user->email; $mobile = $user->mobile; $country_code = $user->country_code; $unit = $user->unit_id; $level = @$user->roles->first()->id; $status = $user->is_active; } if(!empty(old('name'))){ $name = old('name'); $email = old('email'); $mobile = old('mobile'); $country_code = old('country_code'); $unit = old('unit'); $level = old('level'); $status = old('status'); } @endphp @section('title','RCSA - '.$title) @section('main-content') @if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif {{$title}} @if(!empty($user)) @method('PUT') @else @endif @csrf() Name * Email * Password Password Confirmation Mobile No. * Country code @if($countries) @foreach($countries as $key => $val) id ? 'selected' : '' }}> {{ $val->dial_code.' '.ucwords($val->name) }} @endforeach @endif Select Access Level * Select access level @foreach($roles as $id=>$name) {{ucwords($name)}} @endforeach Select Department / Business Entity / Process * Select department / business entity / process @foreach($units as $id=>$name) {{ucwords($name)}} @endforeach Select Status * Select status Active Inactive Cancel Save @endsection @section('additionaljs') @endsection