Компонент Link позволяет создавать ссылки.
Вы можете создать Link, используя статический метод make()
класса Link
.
make(Closure|string $href, Closure|string $label = '')
make(Closure|string $href, Closure|string $label = '')
make(Closure|string $href, Closure|string $label = '')
make(Closure|string $href, Closure|string $label = '')
make(Closure|string $href, Closure|string $label = '')
$href
- URL ссылки,
$label
- заголовок.
use MoonShine\Components\Link;
public function components(): array
{
return [
Link::make(
'/endpoint',
'Ссылка'
)
];
}
use MoonShine\Components\Link;
//...
public function components(): array
{
return [
Link::make(
'/endpoint',
'Ссылка'
)
];
}
//...
use MoonShine\Components\Link;
//...
public function components(): array
{
return [
Link::make(
'/endpoint',
'Ссылка'
)
];
}
//...
use MoonShine\Components\Link;
//...
public function components(): array
{
return [
Link::make(
'/endpoint',
'Ссылка'
)
];
}
//...
use MoonShine\Components\Link;
//...
public function components(): array
{
return [
Link::make(
'/endpoint',
'Ссылка'
)
];
}
//...
Метод icon()
позволяет указать иконку для ссылки.
icon(string $icon)
icon(string $icon)
icon(string $icon)
icon(string $icon)
icon(string $icon)
use MoonShine\Components\Link;
Link::make('/endpoint', 'Редактировать')
->icon('heroicons.outline.pencil')
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Редактировать')
->icon('heroicons.outline.pencil')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Редактировать')
->icon('heroicons.outline.pencil')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Редактировать')
->icon('heroicons.outline.pencil')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Редактировать')
->icon('heroicons.outline.pencil')
//...
Метод badge()
позволяет добавить бейдж к ссылке.
badge(Closure|string|int|float|null $value)
badge(Closure|string|int|float|null $value)
badge(Closure|string|int|float|null $value)
badge(Closure|string|int|float|null $value)
badge(Closure|string|int|float|null $value)
use MoonShine\Components\Link;
Link::make('/endpoint', 'Комментарии')
->badge(fn() => Comment::count())
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Комментарии')
->badge(fn() => Comment::count())
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Комментарии')
->badge(fn() => Comment::count())
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Комментарии')
->badge(fn() => Comment::count())
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Комментарии')
->badge(fn() => Comment::count())
//...
Метод button()
позволяет отображать ссылку как кнопку.
button()
button()
button()
button()
button()
use MoonShine\Components\Link;
Link::make('/endpoint', 'Ссылка')
->button()
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->button()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->button()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->button()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->button()
//...
Метод filled()
устанавливает заполнение для ссылки.
filled()
filled()
filled()
filled()
filled()
use MoonShine\Components\Link;
Link::make('/endpoint', 'Ссылка')
->filled()
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->filled()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->filled()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->filled()
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->filled()
//...
Метод tooltip()
позволяет установить подсказку для ссылки.
tooltip(?string $tooltip = null)
tooltip(?string $tooltip = null)
tooltip(?string $tooltip = null)
tooltip(?string $tooltip = null)
tooltip(?string $tooltip = null)
use MoonShine\Components\Link;
Link::make('/endpoint', 'Ссылка')
->tooltip('Подсказка для ссылки')
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->tooltip('Подсказка для ссылки')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->tooltip('Подсказка для ссылки')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->tooltip('Подсказка для ссылки')
//...
use MoonShine\Components\Link;
//...
Link::make('/endpoint', 'Ссылка')
->tooltip('Подсказка для ссылки')
//...