Компоненты

Profile

Основы

С помощью компонента Profile вы можете отобразить карточку профиля пользователя с кнопкой выхода, переходом в профиль и дополнительным меню.

make(
?string $route = null,
?string $logOutRoute = null,
?Closure $avatar = null,
?Closure $nameOfUser = null,
?Closure $username = null,
bool $withBorder = false,
?string $guard = null,
)
make(
?string $route = null,
?string $logOutRoute = null,
?Closure $avatar = null,
?Closure $nameOfUser = null,
?Closure $username = null,
bool $withBorder = false,
?string $guard = null,
)
  • $route - URL страницы с профилем,
  • $logOutRoute - URL для logout,
  • $avatar - Аватар пользователя,
  • $nameOfUser - Имя пользователя,
  • $username - Nickname пользователя,
  • $withBorder - С разделителем сверху,
  • $guard - Guard.
Profile::make()
Profile::make()

Аватар placeholder

Profile::make()->avatarPlaceholder('https://robohash.org/username.png')
Profile::make()->avatarPlaceholder('https://robohash.org/username.png')
Profile::make()->menu([
ActionButton::make('Dashboard', '/admin')->icon('home-modern'),
])
Profile::make()->menu([
ActionButton::make('Dashboard', '/admin')->icon('home-modern'),
])