PHP code example of kirschbaum-development / nova-inline-select
1. Go to this page and download the library: Download kirschbaum-development/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/ */
kirschbaum-development / nova-inline-select example snippets
namespace App\Nova;
use KirschbaumDevelopment\Nova\InlineSelect;
class User extends Resource
{
// ...
public function fields(Request $request)
{
return [
// ...
InlineSelect::make('Status'),
// ...
];
}
}
InlineSelect::make('Status')->options($options)
->inlineOnIndex()
->inlineOnDetail(),
InlineSelect::make('Status')->options($options)
->inlineOnIndex()
->enableOneStepOnIndex(),
InlineSelect::make('Status')->options($options)
->inlineOnLens()
->enableOneStepOnLens(),
InlineSelect::make('Status')->options($options)
->displayUsingLabels(),
InlineSelect::make('Status')
->options(function () {
return [
'one' => 'foo',
'two' => 'bar',
];
}),
Text::make('Email')
->rules('