Looking to hire Laravel developers? Try LaraJobs

laravel-nova-multiline-text maintained by codingmonkeys

Description
Print multiple lines of text on index or detail view.
Last update
2022/07/03 08:49 (dev-main)
License
Links
Downloads
408
Tags

Comments
comments powered by Disqus

Multiline text field for Laravel Nova 4

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