PHP code example of tylercd100 / laravel-notify

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

    

tylercd100 / laravel-notify example snippets


Notify::debug("This is a debug message!");
Notify::info("This is a info message!");
Notify::notice("This is a notice message!");
Notify::warning("This is a warning message!");
Notify::error("This is a error message!");
Notify::critical("This is a critical message!");
Notify::alert("This is a alert message!");
Notify::emergency("This is a emergency message!");

# Add context
Notify::info("This is a info message with context!",['user'=>$user, 'data'=>$data]);

"Pushover"  => Tylercd100\Notify\Facades\Pushover::class,
"Flowdock"  => Tylercd100\Notify\Facades\Flowdock::class,
"FleepHook" => Tylercd100\Notify\Facades\FleepHook::class,
"Slack"     => Tylercd100\Notify\Facades\Slack::class,
"Plivo"     => Tylercd100\Notify\Facades\Plivo::class,
"Twilio"    => Tylercd100\Notify\Facades\Twilio::class,
"Sentry"    => Tylercd100\Notify\Facades\Sentry::class,
"Mailgun"   => Tylercd100\Notify\Facades\Mailgun::class,

Slack::info("This is information!");
Pushover::critical("Everything is broken and the server room caught fire!");
bash
php artisan vendor:publish --provider="Tylercd100\Notify\Providers\NotifyServiceProvider"