GetEmailSettingsController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 11 1
1
<?php
2
3
namespace App\Http\Controllers\Admin\Email;
4
5
use Inertia\Inertia;
6
7
use App\Models\AppSettings;
8
use App\Http\Controllers\Controller;
9
10
class GetEmailSettingsController extends Controller
11
{
12
    /**
13
     * Form for email settings
14
     */
15
    public function __invoke()
16
    {
17
        $this->authorize('viewAny', AppSettings::class);
18
19
        return Inertia::render('Admin/App/Email', [
20
            'settings' => [
21
                'host'         => config('mail.mailers.smtp.host'),
22
                'port'         => config('mail.mailers.smtp.port'),
23
                'encryption'   => config('mail.mailers.smtp.encryption'),
24
                'username'     => config('mail.mailers.smtp.username'),
25
                'from_address' => config('mail.from.address'),
26
            ],
27
        ]);
28
    }
29
}
30