public function commandBar(): array
{
$buttons[] = Button::make('Preview')->id('ddd')
->icon('check')
->method('preview');
return $buttons;
}
I m new in Laravel Orchid.I wanted to target the preview button by id and perform some javascript action.
Please let me know in which file should i write javascript?
The most common answer is in Orchid documentation:
Since all resources will be loaded on the first call, classic calls will not work. Make sure that your script not waiting for document load and so on.