PHP code example of axn / laravel-notifier

1. Go to this page and download the library: Download axn/laravel-notifier 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/ */

    

axn / laravel-notifier example snippets


// Messages flash (affichés après redirection)
notify()->success('Post '.e($post->title).' mis à jour.');

return back();

// Messages instantanés (affichés dans la requête courante)
notify()->nowInfo('Édition de '.e($post->title));

return view('post.edit');

// ✅ Correct
notify()->success('Post '.e($post->title).' mis à jour.');

// ❌ Faille XSS
notify()->success('Post '.$post->title.' mis à jour.');