GetEmailSettingsController::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
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