Dialogs from the server
Each button asks the server for a dialog: a DialogResponse built in PHP, a Blade view, a React component, or several dialogs stacked on each other.
Sets the JavaScript class controller - if you need to register an extra event listeners (show, shown, hide, hidden) or logic.
Sets the title of a dialog.
Sets the body of a dialog.
Sets the footer of a dialog.
Sets the whole content of a dialog.
Close all opened dialogs.
Close only current dialog.
Render defined dialog.
namespace App\Http\Controllers;
use App\Arch\BigPipe\DialogResponse;
class DialogController extends Controller
{
public function showModal()
{
return (new DialogResponse())
->setTitle('Dialog title')
->setBody('HTML body')
->setFooter('HTML footer')
->setBackdrop('static')
->dialog()
->send();
// or the whole content of the dialog
return (new DialogResponse())
->setDialog('HTML content')
->dialog()
->send();
}
}
Each button asks the server for a dialog: a DialogResponse built in PHP, a Blade view, a React component, or several dialogs stacked on each other.