adryjan
leave the modal open after the action
Is it possible to leave the modal open after performing the action? I'm building a chat for orders and this would be a better solution.
->actions([
Action::make('Order chat')
->label('')
->icon('heroicon-o-chat-bubble-left-ellipsis')
->form([
TextInput::make('message')
->label(__('Message')),
])
->modalContent(view('components.order-chat', ['messages'=>OrderResource::$messages]))
->action(function (array $data, Order $record) {
$chatMessage = new OrderChat();
$chatMessage->id_order = $record->id;
$chatMessage->id_user = auth()->id();
$chatMessage->content = $data['message'];
$chatMessage->save();
})
])
4 replies