LaravelPackages.net
Acme Inc.
Toggle sidebar
milanarandjelovic/noty

Noty notification package for Laravel

353
0
v1.0.0
About milanarandjelovic/noty

milanarandjelovic/noty is a Laravel package for noty notification package for laravel. It currently has 0 GitHub stars and 353 downloads on Packagist (latest version v1.0.0). Install it with composer require milanarandjelovic/noty. Discover more Laravel packages by milanarandjelovic or browse all Laravel packages to compare alternatives.

Last updated

Noty notification package for Laravel

Latest Stable Release Latest Unstable Release License Total Downloads

Installation Steps

Require the package

After create your new Laravel application you can include Noty package with following comand:

composer require milanarandjelovic/noty

Add Provider and Alias

Add Provider and Alias inside of your config/app.php.

'providers' => [
    // other providers
    MA\Noty\NotyServiceProvider::class,
]

'aliases' => [
    // other aliases
    'Noty' => MA\Noty\Facades\Noty::class,
]

Publish config and assets

As optional if you want to modify the default configuration, you can publish the configuration file:

php artisan vendor:publish --provider="MA\Noty\NotyServiceProvider" --tag="config"
php artisan vendor:publish --provider="MA\Noty\NotyServiceProvider" --tag="public" --force

Usage

Include Noty assets and styles in your main view template:

<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        @noty_styles
    </head>
    <body>

        <h1>Main view</h1>

        @noty_scripts
        @noty_render
    </body>
</html>

Example:

 noty()->info('Info Message', 'Info')
       ->success('Success Message', 'Success')
       ->error('Error Message', 'Error')
       ->warning('Warning Message', 'Warning');

License

The Noty is open-sourced software licensed under the MIT license.

Star History Chart