PHPackages                             retinens/laravel-bootstrap-toasts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. retinens/laravel-bootstrap-toasts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

retinens/laravel-bootstrap-toasts
=================================

This package provides an easy interface for using Bootstrap 5+ toast messages in a Laravel app.

145[3 PRs](https://github.com/retinens/laravel-bootstrap-toasts/pulls)PHP

Since Nov 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/retinens/laravel-bootstrap-toasts)[ Packagist](https://packagist.org/packages/retinens/laravel-bootstrap-toasts)[ RSS](/packages/retinens-laravel-bootstrap-toasts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Bootstrap 5 flash messages for your Laravel app
===============================================

[](#bootstrap-5-flash-messages-for-your-laravel-app)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e098acaf88a421d174ca79e36d66af5f1a3e8bdad3af593864d6dc0000749098/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726574696e656e732f6c61726176656c2d746f617374722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/retinens/laravel-toastr)[![GitHub Tests Action Status](https://camo.githubusercontent.com/fdf9f717bc4e5777f6d524de697ac30d975abb0ae4d9ff740849537b37617c33/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f726574696e656e732f6c61726176656c2d746f617374722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/retinens/laravel-toastr/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4f19ab1ea48770f924124e993e22389311a4d7bea24b6194fd32c37b17800c11/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f726574696e656e732f6c61726176656c2d746f617374722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/retinens/laravel-toastr/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0f427642518cb1a41b9c75642984d2accabad72fb2f688a92c03bbb4d39fa3ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726574696e656e732f6c61726176656c2d746f617374722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/retinens/laravel-toastr)

This package provides an easy interface for using Bootstrap 5.2+ toast messages in a Laravel app.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require retinens/laravel-toastr
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-toastr-config"
```

This is the contents of the published config file:

```
return [
    /*
     * Defines the default auto_hide parameter
     */
    'auto_hide' => false,

    /*
     * Defines the position of the toast on the window
     */

    // "top" or "bottom"
    "position_y" => 'bottom',
    // "start" or "end"
    "position_x" => 'end',
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-toastr-views"
```

Usage
-----

[](#usage)

Bootstrap should be imported in your assets and available in the window variable.

```
window.bootstrap = require("bootstrap");
```

First, include this snippet in your Blade template

```

```

Then, in your controller, call the `toast()` method to create a toast message.

```
public function edit()
{
    toast('Post edited!');
    return redirect(route('posts.list'));
}
```

The toast method accepts the title and level as optional arguments :

```
toast('message','level','title')
```

There are a few quick methods to modify the toast:

- `toast('Message')->success()`: Set the toast level as "success".
- `toast('Message')->info()`: Set the toast level as "info".
- `toast('Message')->error()`: Set the toast level as "danger".
- `toast('Message')->warning()`: Set the toast level as "warning".
- `toast('Message')->title("Toast title")`: Set the toast title.
- `toast('Message')->important()`: Add a close button to the toast.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Lucas Houssa](https://github.com/WhereIsLucas)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 61.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bde7d19994372b4f959bc78beb3040c1b08d7ebb6f035304e9cca9d144823062?d=identicon)[WhereIsLucas](/maintainers/WhereIsLucas)

---

Top Contributors

[![WhereIsLucas](https://avatars.githubusercontent.com/u/25830895?v=4)](https://github.com/WhereIsLucas "WhereIsLucas (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

### Embed Badge

![Health badge](/badges/retinens-laravel-bootstrap-toasts/health.svg)

```
[![Health](https://phpackages.com/badges/retinens-laravel-bootstrap-toasts/health.svg)](https://phpackages.com/packages/retinens-laravel-bootstrap-toasts)
```

###  Alternatives

[laravel-frontend-presets/tailwindcss

Laravel frontend preset for Tailwind CSS

1.1k405.6k6](/packages/laravel-frontend-presets-tailwindcss)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[nullref/yii2-datatables

Yii2 Extension for DataTables jQuery plug-in

7290.3k](/packages/nullref-yii2-datatables)[los/basepath

PHP middleware to remove a path prefix from request uri

14132.4k](/packages/los-basepath)[tdwesten/statamic-builder

A fluent blueprint and fieldset builder for Statamic.

3610.3k1](/packages/tdwesten-statamic-builder)[elivz/craft-single-cat

A field type to allow users to select a single category from a dropdown.

1117.2k](/packages/elivz-craft-single-cat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
