Skip to main content Skip to navigation

Components: Account

How to use

Used to display information related to a user account. It extends the Media component but adds an option to display a Dropdown component when clicked.

Account::make()
    ->title('John Doe')
    ->subtitle('Administrator')
    ->image(public_path('users/avatar.jpg'))
    ->dropdown(
        Dropdown::make()
            Link::make('Log out')
                ->route('auth.logout')
                ->method('post')
    );

Available methods

dropdown(?Dropdown $dropdown = null): static

Set a Dropdown component to display when clicking the account.

Account::make()
    ->dropdown(
        Dropdown::make([/* ... */])
    );

Inherited methods

The Account component extends the Media component and inherits all of its methods.