PHPackages                             tjgazel/laravel-bs3-alert - 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. tjgazel/laravel-bs3-alert

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

tjgazel/laravel-bs3-alert
=========================

Bootstrap 3 alerts for laravel 5.\*

v1.0.0(7y ago)025MITPHPPHP &gt;=5.4.0

Since May 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tjgazel/laravel-bs3-alert)[ Packagist](https://packagist.org/packages/tjgazel/laravel-bs3-alert)[ Docs](https://github.com/tjgazel/laravel-bs4-alert)[ RSS](/packages/tjgazel-laravel-bs3-alert/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

Bootstrap 3 alerts for laravel 5.\*
===================================

[](#bootstrap-3-alerts-for-laravel-5)

[![Latest Stable Version](https://camo.githubusercontent.com/26a9544e5198bff1e9f6210d9cdedc8c145315a1fd02025160dcb82f134327f9/68747470733a2f2f706f7365722e707567782e6f72672f746a67617a656c2f6c61726176656c2d6273332d616c6572742f762f737461626c65)](https://packagist.org/packages/tjgazel/laravel-bs3-alert)[![License](https://camo.githubusercontent.com/ea3e5a58e0cc395dbe70613bc615afd06f85491564fa9f2e35634ef759001d86/68747470733a2f2f706f7365722e707567782e6f72672f746a67617a656c2f6c61726176656c2d6273332d616c6572742f6c6963656e7365)](https://github.com/tjgazel/laravel-bs3-alert/blob/master/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/b6025a7cb0ca85d060879565b885c42e183e3cfd7ee9c55c2b80174b674dfc12/68747470733a2f2f706f7365722e707567782e6f72672f746a67617a656c2f6c61726176656c2d6273332d616c6572742f646f776e6c6f616473)](https://packagist.org/packages/tjgazel/laravel-bs3-alert)

[![](bs3-alert.png)](bs3-alert.png)

- [Instalation](#instalation)
- [Usage](#usage)
- [Tanks](#tanks)

**Other packages:**

- [tjgazel/laravel-toastr](https://github.com/tjgazel/laravel-toastr) - Toastr notifications for laravel 5.\*
- [tjgazel/laravel-bs4-alert](https://github.com/tjgazel/laravel-bs4-alert) - Bootstrap 4 alerts for laravel 5.\*

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

[](#installation)

**1)** Run `composer require tjgazel/laravel-bs3-alert` to include this in your project.
`Laravel 5.5 or later` will automatically discover the provider and the alias.

**2)** *Optional:* Laravel 5.4 and below
Add `TJGazel\Bs3Alert\Bs3AlertServiceProvider::class` to `providers` in `config/app.php`
Add `'Bs3Alert' => TJGazel\Bs3Alert\Facades\Bs3Alert::class` to `aliases` in `config/app.php`.

```
// config/app.php
'providers' => [
  // ...
  TJGazel\Bs3Alert\Bs3AlertServiceProvider::class,
],

'aliases' => [
  // ...
  'Bs3Alert' => TJGazel\Bs3Alert\Facades\Bs3Alert::class,
],

```

**3)** Run `php artisan vendor:publish --provider="TJGazel\Bs3Alert\Bs3AlertServiceProvider" --tag="config"`to publish the config file in `config/bs3-alert.php`.

**4)** Include `@include('bs3-alert::template')` somewhere in your template..

```

        @include('bs3-alert::template')

            @yield('content')

```

**5)** *Optional:* Run `php artisan vendor:publish --provider="TJGazel\Bs3Alert\Bs3AlertServiceProvider" --tag="template"`to publish the template view.
Modify the published template located at `resources/views/vendor/bs3-alert/template.php` to your liking.

```
@if(session()->has(config()->get('bs3-alert.session_name')))
  @foreach(session()->get(config()->get('bs3-alert.session_name')) as $bs3Alert)

        &times;

      @if($bs3Alert['title'])
        {!! $bs3Alert['title'] !!}
      @endif
      @foreach($bs3Alert['messages'] as $bs3AlertMessage)
        {!! $bs3AlertMessage !!}
      @endforeach

  @endforeach
@endif

```

**6)** *Optional:* Modify the publish configuration file locate at `config/bs3-alert.php` to your liking.

```
