feat: tambah halaman profil untuk edit data pribadi (nama, email, HP, alamat, password)
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
|
||||||
|
class EditProfile extends \Filament\Auth\Pages\EditProfile
|
||||||
|
{
|
||||||
|
public function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->components([
|
||||||
|
$this->getNameFormComponent(),
|
||||||
|
$this->getEmailFormComponent(),
|
||||||
|
TextInput::make('phone')
|
||||||
|
->label('Nomor HP')
|
||||||
|
->tel()
|
||||||
|
->maxLength(20),
|
||||||
|
TextInput::make('address')
|
||||||
|
->label('Alamat')
|
||||||
|
->maxLength(255),
|
||||||
|
$this->getPasswordFormComponent(),
|
||||||
|
$this->getPasswordConfirmationFormComponent(),
|
||||||
|
$this->getCurrentPasswordFormComponent(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,6 +33,7 @@ class AdminPanelProvider extends PanelProvider
|
|||||||
->path('dashboard')
|
->path('dashboard')
|
||||||
->viteTheme('resources/css/filament/admin/theme.css')
|
->viteTheme('resources/css/filament/admin/theme.css')
|
||||||
->login()
|
->login()
|
||||||
|
->profile(\App\Filament\Pages\EditProfile::class)
|
||||||
->colors([
|
->colors([
|
||||||
'primary' => Color::Amber,
|
'primary' => Color::Amber,
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user