@extends('layouts.app') @section('title', $user->exists ? 'Edit User' : 'Add User') @section('content') @php $editing = $user->exists; @endphp

{{ $editing ? 'Edit User' : 'Add User' }}

Back
@if($errors->any())
Please fix the following:
@endif
@csrf @if($editing) @method('PUT') @endif
Account details
@error('name')
{{ $message }}
@enderror
@error('email')
{{ $message }}
@enderror
@unless($editing)
@error('password')
{{ $message }}
@enderror
Minimum 8 characters.
@endunless
is_active ?? true))>
Inactive users are blocked at login.
Roles *

A user may hold several roles — each one adds its permissions.

@foreach($roles as $role)
@endforeach
Student settings
A student profile is created automatically if one does not exist.
@if($editing)
@can('users.password')
Reset password
@csrf @method('PUT')
@endcan @can('users.impersonate') @unless($user->is(auth()->user()))
View as this user

Sign in as {{ $user->name }} to see exactly what they see. A banner stays on screen so you can return to your own account at any time.

@if($user->is_active)
@csrf
@else
This account is inactive. Activate it first to view as this user.
@endif
@endunless @endcan
Account
  • Created{{ $user->created_at?->format('d M Y') }}
  • Google linked {{ $user->google_id ? 'Yes' : 'No' }}
  • Status {{ $user->is_active ? 'Active' : 'Inactive' }}
@endif
@push('scripts') @endpush @endsection