-
-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathPasskeysPlugin.php
More file actions
51 lines (41 loc) · 1.12 KB
/
PasskeysPlugin.php
File metadata and controls
51 lines (41 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
namespace App\Filament;
use App\Livewire\Passkeys;
use Filament\Contracts\Plugin;
use Filament\Panel;
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;
use Illuminate\View\View;
use Livewire\Livewire;
final class PasskeysPlugin implements Plugin
{
public static function make(): static
{
// @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
return app(self::class);
}
public static function get(): static
{
/** @var static $plugin */
// @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
$plugin = filament(app(static::class)->getId());
return $plugin;
}
public function getId(): string
{
return 'filament-passkeys';
}
public function register(Panel $panel): void
{
//
}
public function boot(Panel $panel): void
{
FilamentView::registerRenderHook(
PanelsRenderHook::AUTH_LOGIN_FORM_AFTER,
fn (): View => view('passkeys.login'),
);
Livewire::component('filament-passkeys', Passkeys::class);
}
}