codingmonkeys / laravel-nova-multiline-text
Print multiple lines of text on index or detail view.
Installs: 313
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: ^7.3|^8.0
- laravel/nova: ^4.0
README
This package provides an index and detail field for printing multiple lines.
Example 1:
MultiLineText::make('Kenmerken', function () {
$lines[] = [
'text' => 'Title here',
'class' => 'font-bold',
];
$lines[] = [
'text' => 'Normal line here',
'class' => 'font-normal',
];
return $lines;
});
Example 2:
MultiLineText::make('Kenmerken', function () {
$lines[] = [
'text' => 'Title here',
'class' => 'font-bold',
];
foreach ($this->relation as $item) {
$lines[] = [
'text' => $item->value,
'class' => 'font-normal',
];
}
return $lines;
}),