@extends('layouts.admin') @section('title') Edit User @endsection @section('page_title') Edit User @endsection @section('content') @push('page_style') @endpush @if($userObject->role == getIdFromSlug('manager') && auth()->user()->isSubAdministrator()) Edit Account Manager Account Managers Edit Account Manager @elseif ($userObject->role == getIdFromSlug('accountant') && auth()->user()->isSubAdministrator()) Edit Accountant Accountants Edit New Accountant @elseif ($userObject->role == getIdFromSlug('moderator') && auth()->user()->isSubAdministrator()) EditModerator Moderators Edit Moderator @else Edit Sub Admin Sub Admins Edit Sub Admin @endif @csrf @method('put') First Name * @if ($errors->has('first_name')) {{ $errors->first('first_name') }} @endif Last Name * @if ($errors->has('last_name')) {{ $errors->first('last_name') }} @endif @if (auth()->user()->isAdmin()) Role * role) == "" ? "selected" : "" }}>Select Role @foreach(getAllRoles() as $key => $roleObj) @if(!isSuperAdmin() && ( ($roleObj->slug == 'admin') || ($roleObj->slug == 'user'))) @continue; @endif role) == $roleObj->id ? "selected" : "" }}>{{$roleObj->title}} @endforeach @if ($errors->has('role')) {{ $errors->first('role') }} @endif @else @endif Email * @if ($errors->has('email')) {{ $errors->first('email') }} @endif Phone Number * @if ($errors->has('phone_number')) {{ $errors->first('phone_number') }} @elseif($errors->has('phone_code')) {{ $errors->first('phone_code') }} @elseif($errors->has('iso_code')) {{ $errors->first('iso_code') }} @endif @push('page_script') @endpush @endsection