Add user roles system
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="mb-4 rounded-lg bg-success-400 px-6 py-5 text-base text-success-800 mt-5" role="alert">
|
||||
{{ $alert->text }}
|
||||
@auth
|
||||
@if(Auth::user()->is_admin)
|
||||
@if(Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR))
|
||||
<form method="POST" action="{{ route('admin.alert.delete', $alert->id) }}" class="float-right hover:text-success-900">
|
||||
@csrf
|
||||
@method('delete')
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="mb-4 rounded-lg bg-danger-400 px-6 py-5 text-base text-danger-800 mt-5" role="alert">
|
||||
{{ $alert->text }}
|
||||
@auth
|
||||
@if(Auth::user()->is_admin)
|
||||
@if(Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR))
|
||||
<form method="POST" action="{{ route('admin.alert.delete', $alert->id) }}" class="float-right hover:text-danger-900">
|
||||
@csrf
|
||||
@method('delete')
|
||||
|
||||
Reference in New Issue
Block a user