PHP code example of tiththa / laravel-notify

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

    

tiththa / laravel-notify example snippets


'providers' => [
    ...
    Mckenziearts\Notify\LaravelNotifyServiceProvider::class
    ...
];

public function store()
{
    notify()->success('Laravel Notify is awesome!');

    return Redirect::home();
}

notify()->success('Welcome to Laravel Notify ⚡️') or notify()->success('Welcome to Laravel Notify ⚡️', 'My custom title')

connectify('success', 'Connection Found', 'Success Message Here')

drakify('success') // for success alert
or
drakify('error') // for error alert

smilify('success', 'You are successfully reconnected')

emotify('success', 'You are awesome, your data was successfully created')

notify()->preset('common-notification')

notify()->preset('common-notification', ['title' => 'This is the overridden title'])

'theme' => env('NOTIFY_THEME', 'dark'),

'preset-messages' => [
    'user-updated' => [
        'message' => 'The user has been updated successfully.',
        'type'    => 'success',
        'model'   => 'connect',
        'title'   => 'User Updated',
    ],
    'user-deleted' => [
        'message' => 'The user has been deleted successfully.',
        'type'    => 'success',
        'model'   => 'connect',
        'title'   => 'User Deleted',
    ],
],