*/ public function handle(MailmanSettings $settings): array { return [ 'is_active' => $settings->is_active, 'base_url' => $settings->base_url, 'username' => $settings->username, 'password' => '', ]; } public function asController(MailmanSettings $settings): Response { session()->put('menu', 'setting'); session()->put('title', 'Mailman-Einstellungen'); $state = $settings->base_url && $settings->username && $settings->password && $settings->is_active ? app(MailmanService::class)->setCredentials($settings->base_url, $settings->username, $settings->password)->check() : null; return Inertia::render('setting/Mailman', [ 'data' => $this->handle($settings), 'state' => $state, ]); } }