ereminmdev/yii2-notyf

Alternative confirmation messages for Yii framework.

Installs: 43

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.4 2023-10-23 05:56 UTC

This package is auto-updated.

Last update: 2024-04-07 11:56:00 UTC


README

Alternative alert - success - error - warning - information - confirmation messages for Yii framework.

Based on JavaScript library: https://github.com/caroso1222/notyf

Install

composer require --prefer-dist ereminmdev/yii2-notyf

Documentation

https://github.com/caroso1222/notyf#global-configuration

Use

Use in view:

<?php

NotyfAsset::register($this);

$this->registerJs('
// Create an instance of Notyf
var notyf = new Notyf();

// Display an error notification
notyf.error("You must fill out the form before moving forward");

// Display a success notification
notyf.success("Your changes have been successfully saved!");

');
?>