PHP code example of milanarandjelovic / noty

1. Go to this page and download the library: Download milanarandjelovic/noty library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

milanarandjelovic / noty example snippets


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

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

<!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>

 noty()->info('Info Message', 'Info')
       ->success('Success Message', 'Success')
       ->error('Error Message', 'Error')
       ->warning('Warning Message', 'Warning');
bash
php artisan vendor:publish --provider="MA\Noty\NotyServiceProvider" --tag="config"
php artisan vendor:publish --provider="MA\Noty\NotyServiceProvider" --tag="public" --force