芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/app/Http/Middleware/HandleInertiaRequests.php
*/ public function share(Request $request): array { if (config('app.installed')) { $permission = $request->user()?->getAllPermissions()->pluck('name')->toArray(); $theme_data = app(PageRepository::class); return array_merge(parent::share($request), [ 'auth' => [ 'user' => $request->user(), 'permissions' => $permission, ], 'flash' => [ 'error' => fn () => $request->session()->get('error'), 'success' => fn () => $request->session()->get('success'), 'payment_status' => fn () => $request->session()->get('payment_status'), ], 'active_theme' => $theme_data->getActiveTheme(), 'ziggy' => function () use ($request) { return array_merge((new Ziggy)->toArray(), [ 'location' => $request->url(), ]); }, ]); } return []; } /** * Handle the incoming request. * * @return \Symfony\Component\HttpFoundation\Response */ public function handle(Request $request, Closure $next) { if ($rootView = func_get_args()[2] ?? null) { $this->rootView = $rootView; } // set app name if (config('app.installed')) { $appName = Setting::pull('site_name'); config()->set('app.name', $appName); } return parent::handle($request, $next); } }