Moved from "app/src" to "app/application".
Otherwise phpstorm doesn't understand the paths correctly. He thinks that this is not a complete application, but a package. And when creating a class, the namespace indicates “app” with a small letter, but should be “App”.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<script>
|
||||
(function() {
|
||||
function clickConfirmAddEventListener(element, index, array) {
|
||||
element.addEventListener('click', (e) => {
|
||||
const result = confirm('{{ $alert }}');
|
||||
if (! result) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
let clickConfirm = document.querySelectorAll('.click-confirm');
|
||||
if (clickConfirm.length > 0) {
|
||||
clickConfirm.forEach(clickConfirmAddEventListener);
|
||||
}
|
||||
})();
|
||||
</script>
|
@@ -0,0 +1,5 @@
|
||||
@section('meta_title', __('admin-sections.Dashboard'))
|
||||
@section('h1', __('admin-sections.Dashboard'))
|
||||
<x-admin.layout>
|
||||
|
||||
</x-admin.layout>
|
@@ -0,0 +1,55 @@
|
||||
<li @class([
|
||||
'nav-item',
|
||||
'active' => request()->route()->named('admin.home')
|
||||
])>
|
||||
<a href="{{ route('admin.home') }}" class="nav-link">
|
||||
<span class="sidebar-icon">
|
||||
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
|
||||
</span>
|
||||
<span class="sidebar-text">{{ __('admin-sections.Dashboard') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@can('viewAny', \App\Models\Project::class)
|
||||
<li @class([
|
||||
'nav-item',
|
||||
'active' => request()->route()->named('admin.projects.*'),
|
||||
])>
|
||||
<a href="{{ route('admin.projects.index') }}" class="nav-link">
|
||||
<span class="sidebar-icon">
|
||||
<svg class="icon icon-xs me-2" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="sidebar-text">{{ __('admin-sections.Projects') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('viewAny', \App\Models\User::class)
|
||||
<li @class([
|
||||
'nav-item',
|
||||
'active' => request()->route()->named('admin.users.*'),
|
||||
])>
|
||||
<a href="{{ route('admin.users.index') }}" class="nav-link">
|
||||
<span class="sidebar-icon">
|
||||
<svg class="icon icon-xs me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1h8Zm-7.978-1A.261.261 0 0 1 7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002a.274.274 0 0 1-.014.002H7.022ZM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6.936 9.28a5.88 5.88 0 0 0-1.23-.247A7.35 7.35 0 0 0 5 9c-4 0-5 3-5 4 0 .667.333 1 1 1h4.216A2.238 2.238 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816ZM4.92 10A5.493 5.493 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275ZM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"/></svg>
|
||||
</span>
|
||||
<span class="sidebar-text">{{ __('admin-sections.Users') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('viewAny', \App\Models\Role::class)
|
||||
<li @class([
|
||||
'nav-item',
|
||||
'active' => request()->route()->named('admin.roles.*'),
|
||||
])>
|
||||
<a href="{{ route('admin.roles.index') }}" class="nav-link">
|
||||
<span class="sidebar-icon">
|
||||
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"></path><path fill-rule="evenodd" d="M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z" clip-rule="evenodd"></path></svg>
|
||||
</span>
|
||||
<span class="sidebar-text">{{ __('admin-sections.User group') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
@@ -0,0 +1,11 @@
|
||||
@csrf
|
||||
<x-volt.forms.checkbox :title="__('validation.attributes.is_public')" name="is_public" checkboxValue="1" notCheckedValue="0" :userValue="(string) $project->is_public" />
|
||||
<x-volt.forms.upload.image :title="__('validation.attributes.logo')" :storage="$project->getStorageOne(\App\Enums\StorageType::Logo)" name="logo" :morph="\App\Enums\Morph::Project" :storageType="\App\Enums\StorageType::Logo" />
|
||||
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$project->name" required autofocus />
|
||||
<x-volt.forms.input :title="__('validation.attributes.code')" name="code" type="text" :value="$project->code" required />
|
||||
<x-volt.forms.input :title="__('validation.attributes.http_host')" :example="'<strong>https://localhost.com</strong> ' . __('or') . ' <strong>http://localhost.com:8080</strong>'" name="http_host" type="text" :value="$project->http_host" />
|
||||
<x-volt.forms.languages name="languages" :value="$languages" />
|
||||
|
||||
@canany(['create', 'update'], $project)
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
@endcanany
|
@@ -0,0 +1,8 @@
|
||||
@can('create', \App\Models\Project::class)
|
||||
<div class="mb-4">
|
||||
<a href="{{ route('admin.projects.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
|
||||
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
||||
{{ __('Create') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
@@ -0,0 +1,16 @@
|
||||
@section('meta_title', __('admin-sections.Projects'))
|
||||
@section('h1', __('admin-sections.Projects'))
|
||||
<x-admin.layout>
|
||||
@include('admin.projects._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.projects.store') }}">
|
||||
@include('admin.projects._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
@@ -0,0 +1,17 @@
|
||||
@section('meta_title', __('admin-sections.Projects'))
|
||||
@section('h1', __('admin-sections.Projects'))
|
||||
<x-admin.layout>
|
||||
@include('admin.projects._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.projects.update', $project) }}">
|
||||
@method('PUT')
|
||||
@include('admin.projects._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
@@ -0,0 +1,58 @@
|
||||
@section('meta_title', __('admin-sections.Projects'))
|
||||
@section('h1', __('admin-sections.Projects'))
|
||||
<x-admin.layout>
|
||||
@include('admin.projects._top')
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('validation.attributes.name') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.code') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.http_host') }}</th>
|
||||
<th class="border-0 rounded-end" style="width: 150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($projects as $project)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.projects.edit', $project) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ $project->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $project->code }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $project->http_host }}
|
||||
</td>
|
||||
<td>
|
||||
@can('delete', $project)
|
||||
<form method="post" action="{{ route('admin.projects.destroy', $project) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger click-confirm">
|
||||
{{ __('Delete') }}
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer border-0">
|
||||
{{ $projects->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
|
||||
@endpush
|
||||
</x-admin.layout>
|
@@ -0,0 +1,7 @@
|
||||
@csrf
|
||||
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$role->name" required autofocus />
|
||||
<x-volt.forms.permissions_for_role :title="__('validation.attributes.permissions')" name="permissions[]" :value="$role->permissions->pluck('permission')->toArray()" :role="$role" />
|
||||
<x-volt.forms.input :title="__('validation.attributes.code')" name="code" type="text" :value="$role->code" :disabled="!empty($role->id)" required />
|
||||
@canany(['create', 'update'], $role)
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
@endcanany
|
@@ -0,0 +1,8 @@
|
||||
@can('create', \App\Models\Role::class)
|
||||
<div class="mb-4">
|
||||
<a href="{{ route('admin.roles.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
|
||||
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
||||
{{ __('Create') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
16
app/application/resources/views/admin/roles/create.blade.php
Normal file
16
app/application/resources/views/admin/roles/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@section('meta_title', __('admin-sections.User group'))
|
||||
@section('h1', __('admin-sections.User group'))
|
||||
<x-admin.layout>
|
||||
@include('admin.roles._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.roles.store') }}">
|
||||
@include('admin.roles._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
20
app/application/resources/views/admin/roles/edit.blade.php
Normal file
20
app/application/resources/views/admin/roles/edit.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
@section('meta_title', __('admin-sections.User group'))
|
||||
@section('h1', __('admin-sections.User group'))
|
||||
<x-admin.layout>
|
||||
@include('admin.roles._top')
|
||||
<div class="row">
|
||||
@if($role->morph_type)
|
||||
<p>{{ $role->name_with_morph }}</p>
|
||||
@endif
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.roles.update', $role) }}">
|
||||
@method('PUT')
|
||||
@include('admin.roles._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
54
app/application/resources/views/admin/roles/index.blade.php
Normal file
54
app/application/resources/views/admin/roles/index.blade.php
Normal file
@@ -0,0 +1,54 @@
|
||||
@section('meta_title', __('admin-sections.User group'))
|
||||
@section('h1', __('admin-sections.User group'))
|
||||
<x-admin.layout>
|
||||
@include('admin.roles._top')
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('validation.attributes.name') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.code') }}</th>
|
||||
<th class="border-0 rounded-end" style="width: 150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.roles.edit', $role) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ $role->name_with_morph }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $role->code }}</td>
|
||||
<td>
|
||||
@if($role->is_remove)
|
||||
@can('delete', $role)
|
||||
<form method="post" action="{{ route('admin.roles.destroy', $role) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger click-confirm">
|
||||
{{ __('Delete') }}
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer border-0">
|
||||
{{ $roles->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
|
||||
@endpush
|
||||
</x-admin.layout>
|
12
app/application/resources/views/admin/users/_from.blade.php
Normal file
12
app/application/resources/views/admin/users/_from.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@csrf
|
||||
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$user->name" required autofocus />
|
||||
<x-volt.forms.input :title="__('validation.attributes.email')" name="email" type="email" :value="$user->email" required />
|
||||
@if (empty($user->id))
|
||||
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" value="" required autocomplete="off" />
|
||||
@endif
|
||||
<hr>
|
||||
<x-volt.forms.multi_checkbox :title="__('validation.attributes.roles')" name="roles[]" :list="$roles" :value="$userRoles" />
|
||||
<hr>
|
||||
@canany(['create', 'update'], $user)
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
@endcanany
|
@@ -0,0 +1,8 @@
|
||||
@can('create', \App\Models\User::class)
|
||||
<div class="mb-4">
|
||||
<a href="{{ route('admin.users.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
|
||||
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
||||
{{ __('Create') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
16
app/application/resources/views/admin/users/create.blade.php
Normal file
16
app/application/resources/views/admin/users/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@section('meta_title', __('admin-sections.Users'))
|
||||
@section('h1', __('admin-sections.Users'))
|
||||
<x-admin.layout>
|
||||
@include('admin.users._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.users.store') }}">
|
||||
@include('admin.users._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
34
app/application/resources/views/admin/users/edit.blade.php
Normal file
34
app/application/resources/views/admin/users/edit.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@section('meta_title', __('admin-sections.Users'))
|
||||
@section('h1', __('admin-sections.Users'))
|
||||
<x-admin.layout>
|
||||
@include('admin.users._top')
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.users.update', $user) }}">
|
||||
@method('PUT')
|
||||
@include('admin.users._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('update', $user)
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('admin.users.update-password', $user) }}">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" value="" required autocomplete="off" />
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</x-admin.layout>
|
52
app/application/resources/views/admin/users/index.blade.php
Normal file
52
app/application/resources/views/admin/users/index.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
@section('meta_title', __('admin-sections.Users'))
|
||||
@section('h1', __('admin-sections.Users'))
|
||||
<x-admin.layout>
|
||||
@include('admin.users._top')
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('validation.attributes.name') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.email') }}</th>
|
||||
<th class="border-0 rounded-end" style="width: 150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.users.edit', $user) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ $user->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@can('delete', $user)
|
||||
<form method="post" action="{{ route('admin.users.destroy', $user) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger click-confirm">
|
||||
{{ __('Delete') }}
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer border-0">
|
||||
{{ $users->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
|
||||
@endpush
|
||||
</x-admin.layout>
|
Reference in New Issue
Block a user