PHP code example of codingmonkeys / laravel-nova-multiline-text

1. Go to this page and download the library: Download codingmonkeys/laravel-nova-multiline-text library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codingmonkeys / laravel-nova-multiline-text example snippets


MultiLineText::make('Kenmerken', function () {
    $lines[] = [
        'text' => 'Title here',
        'class' => 'font-bold',
    ];
    
    $lines[] = [
        'text' => 'Normal line here',
        'class' => 'font-normal',
    ];

    return $lines;
});

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