PHP code example of marshmallow / nova-inline-select

1. Go to this page and download the library: Download marshmallow/nova-inline-select 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/ */

    

marshmallow / nova-inline-select example snippets


use Marshmallow\NovaInlineSelect\NovaInlineSelect;

return NovaInlineSelect::make(__('Assignee'), 'assignee_id')->options([
    1 => 'Stef van Esch',
    2 => 'Lars Kort',
]);

use Marshmallow\NovaInlineSelect\NovaInlineSelect;

return NovaInlineSelect::make(__('Assignee'), 'assignee_id')
    ->options([
        1 => 'Stef van Esch',
        2 => 'Lars Kort',
    ])
    ->avatarImages([
        1 => 'https://marshmallow.dev/stef.png',
        2 => 'https://marshmallow.dev/lars.png',
    ]);

use Marshmallow\NovaInlineSelect\NovaInlineSelect;

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->options([
        'urgent' => 'Urgent',
        // ...
    ])
    ->avatarHtml([
        'urgent' => '<svg class="mm-h-5 mm-w-5 mm-flex-shrink-0">...</svg>',
        // ...
    ]);

use Marshmallow\NovaInlineSelect\NovaInlineSelect;

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->options([
        'urgent' => 'Urgent',
        // ...
    ])
    ->avatarHtml([
        'urgent' => '<svg class="mm-h-5 mm-w-5 mm-flex-shrink-0">...</svg>',
        // ...
    ])
    ->noAvatarImage('<svg class="mm-h-5 mm-w-5 mm-flex-shrink-0">...</svg>');

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->showArrows()
    ->hideArrows()
    ->showArrowsOnIndex()
    ->hideArrowsOnIndex()
    ->showArrowsOnDetail()
    ->hideArrowsOnDetail();

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->showLabel()
    ->hideLabel()
    ->showLabelOnIndex()
    ->hideLabelOnIndex()
    ->showLabelOnDetail()
    ->hideLabelOnDetail();

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->maxWidthOnIndex('180px')
    ->maxWidthOnDetail('inherit');

return NovaInlineSelect::make(__('Priority'), 'priority')
    ->noOptionSelected('No prio set');

Text::make('Email')
    ->rules('