Search by

jambtc / yii2-toastr-widget

jambtc

Un widget Yii2 per flash messages usando Toastr

Package info

github.com/jambtc/yii2-toastr-widget

Type:yii2-extension

pkg:composer/jambtc/yii2-toastr-widget

Statistics

Installs: 2 289

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-10-15 06:26 UTC

This package is auto-updated.

Last update: 2026-10-15 06:26:49 UTC


README

Latest Stable Version Total Downloads License

Un semplice widget Yii2 che integra Toastr.js per mostrare notifiche eleganti basate su messaggi flash.

📦 Installazione

Puoi installarlo facilmente tramite Composer:

composer require jambtc/yii2-toastr-widget

Toastr arriva come pacchetto npm-asset/toastr (versione 2.1.4, compatibile con jQuery 3). Il progetto Yii2 deve poter installare i pacchetti npm-asset/*: con il template base di Yii2 basta il repository asset-packagist nel composer.json:

"repositories": [
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
]

Novità 1.1.0

  • Toastr da npm-asset/toastr 2.1.4 invece di bower-asset/toastr 2.1.3: niente più blocco su jQuery < 3.
  • I flash di tipo danger vengono mostrati come error (prima chiamavano toastr.danger, che non esiste).

Configurazione

Nel layout principale (es: views/layouts/main.php), inserisci il widget:

\jambtc\ToastrWidget\Toast::widget();