PHPackages                             felixl7/laravel-bootstrap-toast - 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. felixl7/laravel-bootstrap-toast

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

felixl7/laravel-bootstrap-toast
===============================

This is a simple Bootstrap Toast Package for Laravel.

v1.2.0(3y ago)2424MITPHPPHP ^7.3|^8.0

Since Jun 6Pushed 3y ago2 watchersCompare

[ Source](https://github.com/FelixL7/laravel-bootstrap-toast)[ Packagist](https://packagist.org/packages/felixl7/laravel-bootstrap-toast)[ RSS](/packages/felixl7-laravel-bootstrap-toast/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Bootstrap Toasts
================

[](#bootstrap-toasts)

This is a simple Bootstrap Toast Package for Laravel.

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

[](#installation)

```
composer require felixl7/laravel-bootstrap-toast
```

You can optionally publish the config file, public resources and blade templates of this package:

```
php artisan vendor:publish --provider="FelixL7\Toast\ToastServiceProvider"
```

Setup
-----

[](#setup)

Just `@include('bootstrap-toast::toaster')` into your layout template and make sure to include jQuery and Bootstrap.

```

```

This package also uses FontAwesome, but you're free to remove it or add your favourite icon package. Just publish the views of this package and replace the icons from the toast type templates.

```

```

Usage
-----

[](#usage)

It's really simple to create Toasts. Just

```
use FelixL7\Toast\Models\Toast;
...
Toast::default('Toast Title', 'Your Message');
Toast::success('Toast Title', 'Your Message');
Toast::info('Toast Title', 'Your Message');
Toast::warning('Toast Title', 'Your Message');
Toast::error('Toast Title', 'Your Message');
```

wherever you want. Or if you return a redirect in your controller:

```
return redirect()->with('toasts', [Toast::success('Toast Title', 'Your Message')]);
```

Config
------

[](#config)

You can customize the toast via the config file. Just publish the packages configuration und edit the bootstrap-toast.php file in your config folder.

```
php artisan vendor:publish --provider="FelixL7\Toast\ToastServiceProvider" --tag=config
```

Custom Toasts
-------------

[](#custom-toasts)

If you want to create some custom toasts, you just have to publish the views of this package. There you have a toasts folder. Here you can create your own toast types. You can call them by

```
Toast::custom('Toast Title', 'Your Message', 'your-type');
```

'your-type' must be identical with your custom toast template name.

You can customize the design of the toasts by adding css. If you want to use the default styles, you just have to publish the css by

```
php artisan vendor:publish --provider="FelixL7\Toast\ToastServiceProvider" --tag=public
```

Validation Error Toast
----------------------

[](#validation-error-toast)

If you want to use Toasts in your custom FormRequest you just need to ad this method:

```
/**
    * Handle a failed validation attempt.
    *
    * @param  \Illuminate\Contracts\Validation\Validator  $validator
    * @return void
    *
    * @throws \Illuminate\Http\Exceptions\HttpResponseException
    */
protected function failedValidation(Validator $validator)
{
    throw new HttpResponseException(
        redirect()->back()
        ->withInput($this->except($this->dontFlash))
        ->withErrors($validator)
        ->with('bootstrap-toasts', [Toast::error('Validation Error', 'The validation of your input failed. Please checkout the validation messages.')])
    );
}
```

Links
-----

[](#links)

- [Bootstrap Toasts](https://getbootstrap.com/docs/4.3/components/toasts/)
- [Laravel](https://laravel.com/)
- [My Homepage](https://felixlipinski.de/)

Contact
-------

[](#contact)

Any Questions or improvement suggestions? Contact me!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~491 days

Total

3

Last Release

1183d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.2

v1.1.0PHP &gt;=7.3

v1.2.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bc9b1672a8a3b4121dd8a2cb5414d3c65730f614218986c9da1e245db67d936?d=identicon)[FelixL7](/maintainers/FelixL7)

---

Top Contributors

[![FelixL7](https://avatars.githubusercontent.com/u/22714206?v=4)](https://github.com/FelixL7 "FelixL7 (10 commits)")

### Embed Badge

![Health badge](/badges/felixl7-laravel-bootstrap-toast/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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