codingmonkeys/laravel-nova-multiline-text

Print multiple lines of text on index or detail view.

0.1.3 2022-07-03 06:49 UTC

This package is auto-updated.

Last update: 2024-04-30 00:51:27 UTC


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;
}),