@extends('layouts.layoutMaster') @section('title', ($model->id ? 'Update' : 'Create') . ' User') @section('vendor-style') @vite('resources/assets/vendor/libs/select2/select2.scss') @endsection @section('vendor-script') @vite('resources/assets/vendor/libs/select2/select2.js') @endsection @section('page-script') @vite('resources/assets/js/forms-selects.js') @endsection @php $m = 'App\Models\User'; $labels = Helper::getModelLabels($m); $breadcrumbs = [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('user.index'), 'label' => 'User'], ]; if ($model->id) { $breadcrumbs[] = [ 'url' => route('user.show', ['user' => $model->id]), 'label' => $model->name, ]; $breadcrumbs[] = [ 'url' => route('user.edit', ['user' => $model->id]), 'label' => 'Update User', ]; } else { $breadcrumbs[] = [ 'url' => route('user.create'), 'label' => 'Create User', ]; } @endphp @section('content')
{{ $model->id ? 'Edit' : 'New' }} User

{{ $model->id ? 'Update user information' : 'Fill in the details below to create a new user' }}

@csrf @if ($model->id) @method('PUT') @endif
@error('name')
{{ $message }}
@enderror
@error('username')
{{ $message }}
@enderror
@error('role_id')
{{ $message }}
@enderror
id ? 'required' : '' }}> @error('password')
{{ $message }}
@enderror @if ($model->id) Leave blank if you don't want to change the password @endif
id ? 'required' : '' }}> @error('password_confirmation')
{{ $message }}
@enderror
Cancel
@endsection