管理员中间件

This commit is contained in:
Wisp X
2022-01-20 09:20:33 +08:00
parent ef4d214a9e
commit 74d89ee9a6
6 changed files with 159 additions and 133 deletions

View File

@@ -0,0 +1,14 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\View\View;
class GroupController extends Controller
{
public function index(): View
{
return view('admin.group.groups');
}
}

View File

@@ -56,6 +56,7 @@ class Kernel extends HttpKernel
protected $routeMiddleware = [ protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class, 'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.admin' => \App\Http\Middleware\AuthenticateWithAdmin::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Http\Middleware;
use App\Models\User;
use Closure;
use Illuminate\Contracts\Auth\Factory as AuthFactory;
use Illuminate\Http\Request;
class AuthenticateWithAdmin
{
/**
* The guard factory instance.
*
* @var \Illuminate\Contracts\Auth\Factory
*/
protected $auth;
/**
* Create a new middleware instance.
*
* @param \Illuminate\Contracts\Auth\Factory $auth
* @return void
*/
public function __construct(AuthFactory $auth)
{
$this->auth = $auth;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*/
public function handle($request, Closure $next, $guard = null)
{
if ($this->auth->guard($guard)->check()) {
/** @var User $user */
$user = $this->auth->guard($guard)->user();
if (! $user->is_adminer) {
return abort(403);
}
}
return $next($request);
}
}

204
public/css/app.css vendored
View File

@@ -801,9 +801,6 @@ select {
.-mr-2 { .-mr-2 {
margin-right: -0.5rem; margin-right: -0.5rem;
} }
.mt-5 {
margin-top: 1.25rem;
}
.block { .block {
display: block; display: block;
} }
@@ -831,6 +828,9 @@ select {
.h-10 { .h-10 {
height: 2.5rem; height: 2.5rem;
} }
.h-4 {
height: 1rem;
}
.h-screen { .h-screen {
height: 100vh; height: 100vh;
} }
@@ -849,14 +849,11 @@ select {
.h-20 { .h-20 {
height: 5rem; height: 5rem;
} }
.h-6 {
height: 1.5rem;
}
.h-7 { .h-7 {
height: 1.75rem; height: 1.75rem;
} }
.h-4 { .h-6 {
height: 1rem; height: 1.5rem;
} }
.min-h-\[150px\] { .min-h-\[150px\] {
min-height: 150px; min-height: 150px;
@@ -882,6 +879,9 @@ select {
.w-\[80\%\] { .w-\[80\%\] {
width: 80%; width: 80%;
} }
.w-4 {
width: 1rem;
}
.w-3\/4 { .w-3\/4 {
width: 75%; width: 75%;
} }
@@ -891,20 +891,17 @@ select {
.w-48 { .w-48 {
width: 12rem; width: 12rem;
} }
.w-20 {
width: 5rem;
}
.w-6 {
width: 1.5rem;
}
.w-64 { .w-64 {
width: 16rem; width: 16rem;
} }
.w-\[90\%\] { .w-\[90\%\] {
width: 90%; width: 90%;
} }
.w-4 { .w-20 {
width: 1rem; width: 5rem;
}
.w-6 {
width: 1.5rem;
} }
.max-w-xl { .max-w-xl {
max-width: 36rem; max-width: 36rem;
@@ -994,12 +991,12 @@ select {
.list-disc { .list-disc {
list-style-type: disc; list-style-type: disc;
} }
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-6 { .grid-cols-6 {
grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-columns: repeat(6, minmax(0, 1fr));
} }
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.flex-row { .flex-row {
flex-direction: row; flex-direction: row;
} }
@@ -1012,9 +1009,6 @@ select {
.flex-nowrap { .flex-nowrap {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.items-start {
align-items: flex-start;
}
.items-center { .items-center {
align-items: center; align-items: center;
} }
@@ -1068,16 +1062,21 @@ select {
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
} }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { .space-x-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0; --tw-space-x-reverse: 0;
margin-right: calc(0.75rem * var(--tw-space-x-reverse)); margin-right: calc(1.5rem * var(--tw-space-x-reverse));
margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
} }
.space-x-1 > :not([hidden]) ~ :not([hidden]) { .space-x-1 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0; --tw-space-x-reverse: 0;
margin-right: calc(0.25rem * var(--tw-space-x-reverse)); margin-right: calc(0.25rem * var(--tw-space-x-reverse));
margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));
} }
.space-x-3 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.75rem * var(--tw-space-x-reverse));
margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-8 > :not([hidden]) ~ :not([hidden]) { .space-x-8 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0; --tw-space-x-reverse: 0;
margin-right: calc(2rem * var(--tw-space-x-reverse)); margin-right: calc(2rem * var(--tw-space-x-reverse));
@@ -1088,11 +1087,6 @@ select {
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
} }
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1.5rem * var(--tw-space-x-reverse));
margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.divide-y > :not([hidden]) ~ :not([hidden]) { .divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0; --tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@@ -1226,6 +1220,10 @@ select {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(248 113 113 / var(--tw-bg-opacity)); background-color: rgb(248 113 113 / var(--tw-bg-opacity));
} }
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}
.bg-black { .bg-black {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity)); background-color: rgb(0 0 0 / var(--tw-bg-opacity));
@@ -1242,10 +1240,6 @@ select {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(248 250 252 / var(--tw-bg-opacity)); background-color: rgb(248 250 252 / var(--tw-bg-opacity));
} }
.bg-gray-700 {
--tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}
.bg-gray-500 { .bg-gray-500 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(107 114 128 / var(--tw-bg-opacity)); background-color: rgb(107 114 128 / var(--tw-bg-opacity));
@@ -1262,13 +1256,9 @@ select {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(96 165 250 / var(--tw-bg-opacity)); background-color: rgb(96 165 250 / var(--tw-bg-opacity));
} }
.bg-indigo-600 { .bg-gray-700 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(79 70 229 / var(--tw-bg-opacity)); background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
} }
.bg-opacity-75 { .bg-opacity-75 {
--tw-bg-opacity: 0.75; --tw-bg-opacity: 0.75;
@@ -1325,6 +1315,14 @@ select {
padding-top: 0.75rem; padding-top: 0.75rem;
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
} }
.py-5 {
padding-top: 1.25rem;
padding-bottom: 1.25rem;
}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
}
.px-6 { .px-6 {
padding-left: 1.5rem; padding-left: 1.5rem;
padding-right: 1.5rem; padding-right: 1.5rem;
@@ -1337,14 +1335,6 @@ select {
padding-left: 1.25rem; padding-left: 1.25rem;
padding-right: 1.25rem; padding-right: 1.25rem;
} }
.py-14 {
padding-top: 3.5rem;
padding-bottom: 3.5rem;
}
.px-3 {
padding-left: 0.75rem;
padding-right: 0.75rem;
}
.px-2\.5 { .px-2\.5 {
padding-left: 0.625rem; padding-left: 0.625rem;
padding-right: 0.625rem; padding-right: 0.625rem;
@@ -1353,14 +1343,14 @@ select {
padding-top: 0.375rem; padding-top: 0.375rem;
padding-bottom: 0.375rem; padding-bottom: 0.375rem;
} }
.py-14 {
padding-top: 3.5rem;
padding-bottom: 3.5rem;
}
.py-10 { .py-10 {
padding-top: 2.5rem; padding-top: 2.5rem;
padding-bottom: 2.5rem; padding-bottom: 2.5rem;
} }
.py-5 {
padding-top: 1.25rem;
padding-bottom: 1.25rem;
}
.pb-6 { .pb-6 {
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
} }
@@ -1421,6 +1411,10 @@ select {
font-size: 3rem; font-size: 3rem;
line-height: 1; line-height: 1;
} }
.text-base {
font-size: 1rem;
line-height: 1.5rem;
}
.text-lg { .text-lg {
font-size: 1.125rem; font-size: 1.125rem;
line-height: 1.75rem; line-height: 1.75rem;
@@ -1429,10 +1423,6 @@ select {
font-size: 2.25rem; font-size: 2.25rem;
line-height: 2.5rem; line-height: 2.5rem;
} }
.text-base {
font-size: 1rem;
line-height: 1.5rem;
}
.font-medium { .font-medium {
font-weight: 500; font-weight: 500;
} }
@@ -1448,9 +1438,6 @@ select {
.leading-7 { .leading-7 {
line-height: 1.75rem; line-height: 1.75rem;
} }
.leading-6 {
line-height: 1.5rem;
}
.tracking-wider { .tracking-wider {
letter-spacing: 0.05em; letter-spacing: 0.05em;
} }
@@ -1513,6 +1500,10 @@ select {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity)); color: rgb(17 24 39 / var(--tw-text-opacity));
} }
.text-indigo-600 {
--tw-text-opacity: 1;
color: rgb(79 70 229 / var(--tw-text-opacity));
}
.text-blue-500 { .text-blue-500 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity)); color: rgb(59 130 246 / var(--tw-text-opacity));
@@ -1529,18 +1520,14 @@ select {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(22 163 74 / var(--tw-text-opacity)); color: rgb(22 163 74 / var(--tw-text-opacity));
} }
.text-indigo-600 { .text-red-400 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(79 70 229 / var(--tw-text-opacity)); color: rgb(248 113 113 / var(--tw-text-opacity));
} }
.text-slate-600 { .text-slate-600 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(71 85 105 / var(--tw-text-opacity)); color: rgb(71 85 105 / var(--tw-text-opacity));
} }
.text-red-400 {
--tw-text-opacity: 1;
color: rgb(248 113 113 / var(--tw-text-opacity));
}
.underline { .underline {
-webkit-text-decoration-line: underline; -webkit-text-decoration-line: underline;
text-decoration-line: underline; text-decoration-line: underline;
@@ -1667,25 +1654,21 @@ select {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(229 231 235 / var(--tw-bg-opacity)); background-color: rgb(229 231 235 / var(--tw-bg-opacity));
} }
.hover\:bg-blue-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
}
.hover\:bg-gray-700:hover { .hover\:bg-gray-700:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity)); background-color: rgb(55 65 81 / var(--tw-bg-opacity));
} }
.hover\:bg-gray-600:hover {
--tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity));
}
.hover\:bg-blue-300:hover { .hover\:bg-blue-300:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(147 197 253 / var(--tw-bg-opacity)); background-color: rgb(147 197 253 / var(--tw-bg-opacity));
} }
.hover\:bg-indigo-700:hover { .hover\:bg-gray-600:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(67 56 202 / var(--tw-bg-opacity)); background-color: rgb(75 85 99 / var(--tw-bg-opacity));
}
.hover\:bg-blue-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
} }
.hover\:text-gray-500:hover { .hover\:text-gray-500:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
@@ -1718,6 +1701,10 @@ select {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(147 197 253 / var(--tw-border-opacity)); border-color: rgb(147 197 253 / var(--tw-border-opacity));
} }
.focus\:border-indigo-500:focus {
--tw-border-opacity: 1;
border-color: rgb(99 102 241 / var(--tw-border-opacity));
}
.focus\:border-gray-900:focus { .focus\:border-gray-900:focus {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(17 24 39 / var(--tw-border-opacity)); border-color: rgb(17 24 39 / var(--tw-border-opacity));
@@ -1730,10 +1717,6 @@ select {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(209 213 219 / var(--tw-border-opacity)); border-color: rgb(209 213 219 / var(--tw-border-opacity));
} }
.focus\:border-indigo-500:focus {
--tw-border-opacity: 1;
border-color: rgb(99 102 241 / var(--tw-border-opacity));
}
.focus\:bg-gray-100:focus { .focus\:bg-gray-100:focus {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity)); background-color: rgb(243 244 246 / var(--tw-bg-opacity));
@@ -1760,6 +1743,10 @@ select {
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
} }
.focus\:ring-indigo-500:focus {
--tw-ring-opacity: 1;
--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
}
.focus\:ring-white:focus { .focus\:ring-white:focus {
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));
@@ -1768,10 +1755,6 @@ select {
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(199 210 254 / var(--tw-ring-opacity)); --tw-ring-color: rgb(199 210 254 / var(--tw-ring-opacity));
} }
.focus\:ring-indigo-500:focus {
--tw-ring-opacity: 1;
--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
}
.focus\:ring-opacity-50:focus { .focus\:ring-opacity-50:focus {
--tw-ring-opacity: 0.5; --tw-ring-opacity: 0.5;
} }
@@ -1820,14 +1803,6 @@ select {
grid-column: span 3 / span 3; grid-column: span 3 / span 3;
} }
.sm\:col-span-4 {
grid-column: span 4 / span 4;
}
.sm\:col-span-6 {
grid-column: span 6 / span 6;
}
.sm\:-my-px { .sm\:-my-px {
margin-top: -1px; margin-top: -1px;
margin-bottom: -1px; margin-bottom: -1px;
@@ -1845,10 +1820,6 @@ select {
margin-left: 1.5rem; margin-left: 1.5rem;
} }
.sm\:mt-0 {
margin-top: 0px;
}
.sm\:block { .sm\:block {
display: block; display: block;
} }
@@ -1893,14 +1864,14 @@ select {
justify-content: space-between; justify-content: space-between;
} }
.sm\:rounded-lg {
border-radius: 0.5rem;
}
.sm\:rounded-md { .sm\:rounded-md {
border-radius: 0.375rem; border-radius: 0.375rem;
} }
.sm\:rounded-lg {
border-radius: 0.5rem;
}
.sm\:p-6 { .sm\:p-6 {
padding: 1.5rem; padding: 1.5rem;
} }
@@ -1915,25 +1886,20 @@ select {
padding-right: 2.5rem; padding-right: 2.5rem;
} }
.sm\:px-0 {
padding-left: 0px;
padding-right: 0px;
}
.sm\:pt-0 { .sm\:pt-0 {
padding-top: 0px; padding-top: 0px;
} }
.sm\:text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.sm\:text-sm { .sm\:text-sm {
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.25rem; line-height: 1.25rem;
} }
.sm\:text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.sm\:shadow-none { .sm\:shadow-none {
--tw-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000; --tw-shadow-colored: 0 0 #0000;
@@ -1942,14 +1908,6 @@ select {
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.md\:col-span-1 {
grid-column: span 1 / span 1;
}
.md\:col-span-2 {
grid-column: span 2 / span 2;
}
.md\:my-10 { .md\:my-10 {
margin-top: 2.5rem; margin-top: 2.5rem;
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
@@ -1987,18 +1945,10 @@ select {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.md\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.md\:flex-row { .md\:flex-row {
flex-direction: row; flex-direction: row;
} }
.md\:gap-6 {
gap: 1.5rem;
}
.md\:gap-x-4 { .md\:gap-x-4 {
-moz-column-gap: 1rem; -moz-column-gap: 1rem;
column-gap: 1rem; column-gap: 1rem;
@@ -2035,10 +1985,6 @@ select {
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.lg\:col-span-2 {
grid-column: span 2 / span 2;
}
.lg\:flex { .lg\:flex {
display: flex; display: flex;
} }

View File

@@ -0,0 +1,7 @@
@section('title', '角色组管理')
<x-app-layout>
<div class="my-6 md:my-10">
111
</div>
</x-app-layout>

View File

@@ -18,12 +18,14 @@ use App\Http\Controllers\User\ImageController;
use App\Http\Controllers\User\AlbumController; use App\Http\Controllers\User\AlbumController;
use App\Http\Controllers\User\ProfileController; use App\Http\Controllers\User\ProfileController;
use App\Http\Controllers\Admin\GroupController as AdminGroupController;
Route::get('/', fn () => view('welcome'))->name('/'); Route::get('/', fn () => view('welcome'))->name('/');
Route::post('/upload', [Controller::class, 'upload']); Route::post('upload', [Controller::class, 'upload']);
Route::group(['middleware' => ['auth']], function () { Route::group(['middleware' => ['auth']], function () {
Route::get('/dashboard', [UserController::class, 'dashboard'])->name('dashboard'); Route::get('dashboard', [UserController::class, 'dashboard'])->name('dashboard');
Route::get('/upload', fn () => view('user.upload'))->name('upload'); Route::get('upload', fn () => view('user.upload'))->name('upload');
Route::get('/images', [ImageController::class, 'index'])->name('images'); Route::get('images', [ImageController::class, 'index'])->name('images');
Route::group(['prefix' => 'user'], function () { Route::group(['prefix' => 'user'], function () {
Route::get('images', [ImageController::class, 'images'])->name('user.images'); Route::get('images', [ImageController::class, 'images'])->name('user.images');
Route::get('images/{id}', [ImageController::class, 'image'])->name('user.image'); Route::get('images/{id}', [ImageController::class, 'image'])->name('user.image');
@@ -40,5 +42,9 @@ Route::group(['middleware' => ['auth']], function () {
Route::put('settings', [ProfileController::class, 'update'])->name('settings.update'); Route::put('settings', [ProfileController::class, 'update'])->name('settings.update');
}); });
Route::group(['prefix' => 'admin', 'middleware' => ['auth.admin']], function () {
Route::get('groups', [AdminGroupController::class, 'index'])->name('admin.groups');
});
require __DIR__.'/image.php'; require __DIR__.'/image.php';
require __DIR__.'/auth.php'; require __DIR__.'/auth.php';