feat: Integrate Filament Auth UI Enhancer plugin and configure a custom admin theme for the login page.

This commit is contained in:
Yoga Pangestu 2026-02-07 16:19:55 +07:00
parent 70617e681a
commit 7a70ef7d74
8 changed files with 2516 additions and 5 deletions

View File

@ -4,6 +4,7 @@
use App\Filament\Support\CheerfulNotification;
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
use DiogoGPinto\AuthUIEnhancer\Pages\Auth\Concerns\HasCustomLayout;
use Filament\Auth\Http\Responses\Contracts\LoginResponse;
use Filament\Auth\MultiFactor\Contracts\HasBeforeChallengeHook;
use Filament\Auth\Pages\Login as FilamentLogin;
@ -21,6 +22,8 @@
class Login extends FilamentLogin
{
use HasCustomLayout;
public function getHeading(): string|Htmlable
{
return '';
@ -133,7 +136,7 @@ public function authenticate(): ?LoginResponse
CheerfulNotification::success(
'Hore! Berhasil Masuk 🎉',
'Selamat datang kembali, '.$user->name.'! Siap untuk beraksi hari ini? 🚀✨'
'Selamat datang kembali, ' . $user->name . '! Siap untuk beraksi hari ini? 🚀✨'
)->send();
return app(LoginResponse::class);

View File

@ -3,6 +3,7 @@
namespace App\Providers\Filament;
use App\Filament\Pages\Auth\Login;
use DiogoGPinto\AuthUIEnhancer\AuthUIEnhancerPlugin;
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\AuthenticateSession;
use Filament\Http\Middleware\DisableBladeIconComponents;
@ -28,6 +29,7 @@ public function panel(Panel $panel): Panel
->default()
->id('admin')
->path('admin')
->viteTheme('resources/css/filament/admin/theme.css')
->login(Login::class)
->colors([
'primary' => Color::Violet,
@ -55,6 +57,10 @@ public function panel(Panel $panel): Panel
])
->authMiddleware([
Authenticate::class,
])
->plugins([
AuthUIEnhancerPlugin::make()
->formPanelPosition('left'),
]);
}
}

View File

@ -7,6 +7,7 @@
"license": "MIT",
"require": {
"php": "^8.2",
"diogogpinto/filament-auth-ui-enhancer": "^2.0",
"filament/filament": "^4.0",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1"

76
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d06fce5a31d9da3c576b967652ed06de",
"content-hash": "28d56c0579aa0bff54a3eda86204b137",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@ -690,6 +690,80 @@
},
"time": "2024-07-08T12:26:09+00:00"
},
{
"name": "diogogpinto/filament-auth-ui-enhancer",
"version": "v2.0.2",
"source": {
"type": "git",
"url": "https://github.com/diogogpinto/filament-auth-ui-enhancer.git",
"reference": "dcaf3eb200fa7120987d92d8b8df760ed5dd13df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/diogogpinto/filament-auth-ui-enhancer/zipball/dcaf3eb200fa7120987d92d8b8df760ed5dd13df",
"reference": "dcaf3eb200fa7120987d92d8b8df760ed5dd13df",
"shasum": ""
},
"require": {
"filament/filament": "^4.0 | ^5.0",
"php": "^8.2",
"spatie/laravel-package-tools": "^1.15"
},
"require-dev": {
"laravel/pint": "^1.0",
"orchestra/testbench": "^9.0|^10.0",
"pestphp/pest": "^3.7",
"pestphp/pest-plugin-laravel": "^3.0",
"pestphp/pest-plugin-livewire": "^3.0"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"AuthUIEnhancer": "DiogoGPinto\\AuthUIEnhancer\\Facades\\AuthUIEnhancer"
},
"providers": [
"DiogoGPinto\\AuthUIEnhancer\\AuthUIEnhancerServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"DiogoGPinto\\AuthUIEnhancer\\": "src/",
"DiogoGPinto\\AuthUIEnhancer\\Database\\Factories\\": "database/factories/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Diogo Pinto",
"role": "Developer"
}
],
"description": "This Filament plugin empowers you to transform your auth pages with ease, allowing you to make them truly stand out. It offers a flexible alternative to the default auth pages in the Filament Panels package.",
"homepage": "https://github.com/diogogpinto/filament-auth-ui-enhancer",
"keywords": [
"diogogpinto",
"filament",
"filament-auth-ui-enhancer",
"filament-plugin",
"laravel"
],
"support": {
"issues": "https://github.com/diogogpinto/filament-auth-ui-enhancer/issues",
"source": "https://github.com/diogogpinto/filament-auth-ui-enhancer"
},
"funding": [
{
"url": "https://github.com/diogogpinto",
"type": "github"
}
],
"time": "2026-01-18T00:13:04+00:00"
},
{
"name": "doctrine/inflector",
"version": "2.1.0",

2421
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,11 @@
"dev": "vite"
},
"devDependencies": {
"@tailwindcss/vite": "^4.0.0",
"@tailwindcss/vite": "^4.1.18",
"axios": "^1.11.0",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^2.0.0",
"tailwindcss": "^4.0.0",
"tailwindcss": "^4.1.18",
"vite": "^7.0.7"
}
}

View File

@ -0,0 +1,6 @@
@import '../../../../vendor/filament/filament/resources/css/theme.css';
@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';
@source '../../../../vendor/diogogpinto/filament-auth-ui-enhancer/resources/**/*.blade.php';

View File

@ -5,7 +5,7 @@ import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
input: ['resources/css/app.css', 'resources/js/app.js', 'resources/css/filament/admin/theme.css'],
refresh: true,
}),
tailwindcss(),