Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Bootstrap3 Dialog

Bootstrap3 Dialog Laravel Package

cross-solution/bootstrap3-dialog

Laravel/PHP wrapper for Bootstrap 3 Dialog (bootstrap3-dialog) modals. Provides a simple API to create, configure, and trigger dialog boxes/alerts/confirmations within Bootstrap 3-based apps, helping standardize modal UI behavior across your project.

Deep Wiki
Context7

cross-solution/bootstrap3-dialog is a small Laravel/PHP package that helps you integrate Bootstrap 3 dialog/modals into your application with a cleaner, reusable API. It’s aimed at projects still running Bootstrap 3 that want consistent dialogs without rewriting modal markup across views.

Features

  • Simple helpers to build and render Bootstrap 3 modal dialogs
  • Centralized configuration for titles, buttons, sizes, and options
  • Designed to keep views tidy by reducing repeated HTML/JS
  • Works well in legacy Bootstrap 3 stacks where upgrades aren’t possible
Frequently asked questions about Bootstrap3 Dialog
How do I install cross-solution/bootstrap3-dialog in my Laravel project?
Run `composer require cross-solution/bootstrap3-dialog` to install the package. Ensure Bootstrap 3’s CSS and JS are already loaded in your project (this is a hard requirement). No additional Laravel service provider setup is needed—just include the package’s JS file in your layout.
Does this package work with Laravel 5.x or only newer versions?
The package is designed for Laravel 5.x and older projects still using Bootstrap 3. While it may work in newer Laravel versions, it lacks native integration with Laravel’s modern features (e.g., Blade directives, service providers). Test thoroughly if using Laravel 6+.
Can I use this for dynamic modals with AJAX content?
Yes, the package supports dynamic content by allowing you to initialize modals via JavaScript after AJAX calls. You’ll need to manually trigger the dialog using the package’s API (e.g., `new Bootstrap3Dialog('#modal-id')`) after loading content via fetch or jQuery.
Will this conflict with Bootstrap 4/5 or custom modal solutions?
Yes, this package is **Bootstrap 3-only** and may conflict with Bootstrap 4/5 or custom modal CSS/JS. To mitigate risks, isolate the package’s scope by using unique class prefixes or loading it in a micro-namespace (e.g., a specific partial view).
Is there Blade directive support (e.g., @dialog) like other Laravel packages?
No, this package does not include Blade directives. You’ll need to manually include modal HTML in your views and initialize them via JavaScript. For Blade-like syntax, consider wrapping the HTML in a custom Blade component or macro.
How do I configure global settings like default titles or button styles?
The package provides a centralized configuration via JavaScript. Set defaults in your layout file (e.g., `window.Bootstrap3DialogConfig = { title: 'Alert', buttons: ['OK'] }`) before initializing any modals. This avoids repeating markup across views.
Can I use this with Livewire or Inertia.js in Laravel?
No, this package is **not compatible** with Livewire or Inertia.js. Modals in those frameworks should be handled by the frontend framework’s native solutions (e.g., Alpine.js, Vue, or React components). This package is for vanilla Laravel apps with server-rendered HTML.
What if I need to upgrade from Bootstrap 3 to Bootstrap 5 later?
Plan for a full migration away from this package, as it has no Bootstrap 5 support. Start by auditing all modal usage in your app and replace this package with a Bootstrap 5-compatible solution (e.g., a custom modal component or a package like `laravel-bootstrap-modal` for Bootstrap 5).
Are there alternatives for Laravel that support Bootstrap 5 or modern frameworks?
Yes, consider alternatives like `spatie/laravel-modal` (for Bootstrap 5), `filamentphp/filament` (for admin panels), or frontend frameworks like Alpine.js, Livewire, or Inertia.js for dynamic modals. These offer better Laravel integration and future-proofing.
How do I test modals created with this package in PHPUnit?
Since the package is client-side only, test it by simulating modal triggers in your JavaScript tests (e.g., Jest or Karma). For Laravel, mock the modal initialization in Blade views and verify the rendered HTML structure. Use tools like `laravel/browser-kit-testing` to check if modal elements exist in the DOM.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware