<?php
namespace App\Http\Middleware;
class ManagementAccount {public function handle($request,\Closure $next){if(!auth()->check())return redirect('/login');abort_unless(auth()->user()->canAccessPanel(\Filament\Facades\Filament::getCurrentPanel()),403);return $next($request);}}
