PHP code example of sprigs / expandable-row

1. Go to this page and download the library: Download sprigs/expandable-row 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/ */

    

sprigs / expandable-row example snippets


// in app/Nova/YourResource.php

use Sprigs\ExpandableRow\ExpandableRow;

// ...

public function fields(NovaRequest $request)
    {
        return [      
            // ... your other fields
            
            ExpandableRow::make('')
   ];
}

ExpandableRow::make('')
    ->expandingData(
        [
            [
                'name' => 'Custom row',
                'value' => 'Single string', // Can be a string or array of strings
            ],
            [
                'name' => 'Title of another item',
                'value' => [
                    'Array of strings',
                    'That gets displayed as a list',
                    'Keeping the stule of the preview panel tags'],
            ],
        ]
    );

ExpandableRow::make('')->showIcon('cube-transparent', true)