### Install Laravel Notify via Composer Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Installs the Laravel Notify package using Composer, the PHP dependency manager. ```sh $ composer require mckenziearts/laravel-notify ``` -------------------------------- ### Define Preset Notifications in Laravel Notify Config Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md This PHP configuration snippet illustrates how to define custom preset notifications within the `config/notify.php` file. It provides examples for 'user-updated' and 'user-deleted' messages, including their message text, type, model, and title, allowing for reusable notification configurations. ```php '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', ], ], ``` -------------------------------- ### Publish Laravel Notify Configuration and Assets Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Publishes the configuration file and assets for Laravel Notify, allowing customization. ```sh $ php artisan vendor:publish --provider="Mckenziearts\Notify\LaravelNotifyServiceProvider" ``` -------------------------------- ### Use Preset Notification Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Explains how to use a predefined preset notification from the config file, making it easier to maintain commonly used notifications. ```php notify()->preset('common-notification') ``` -------------------------------- ### Display Connectify Notification Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Demonstrates the basic usage of the `connectify()` helper function for a specific notification type. ```php connectify('success', 'Connection Found', 'Success Message Here') ``` -------------------------------- ### Display Drakify Alert Notification Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Illustrates how to use `drakify()` to display simple success or error alerts. ```php drakify('success') // for success alert or drakify('error') // for error alert ``` -------------------------------- ### Complete Laravel Notify Blade Layout Integration Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Shows a full HTML Blade template integrating Laravel Notify styles, scripts, and the notification component for display. ```blade Laravel Notify @notifyCss @notifyJs ``` -------------------------------- ### Display Toast Notification with Laravel Notify Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Shows how to create a default toast notification using `notify()->success()` with an optional custom title. ```php notify()->success('Welcome to Laravel Notify ⚡️') or notify()->success('Welcome to Laravel Notify ⚡️', 'My custom title') ``` -------------------------------- ### Configure Laravel Notify Theme Setting Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md This PHP snippet demonstrates how to set the theme for Laravel Notify within its configuration file. It shows the 'theme' key, which can be overridden by the 'NOTIFY_THEME' environment variable, defaulting to 'dark' if not specified. ```php 'theme' => env('NOTIFY_THEME', 'dark'), ``` -------------------------------- ### Add Laravel Notify Service Provider Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Registers the Laravel Notify service provider in `config/app.php` for Laravel versions prior to 5.5 or when package auto-discovery is disabled. ```php 'providers' => [ ... Mckenziearts\Notify\LaravelNotifyServiceProvider::class ... ]; ``` -------------------------------- ### Display Success Notification in Laravel Controller Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Demonstrates how to trigger a success toast notification using the `notify()` helper function within a Laravel controller before a redirect. ```php public function store() { notify()->success('Laravel Notify is awesome!'); return Redirect::home(); } ``` -------------------------------- ### Display Emotify Custom Toast Notification Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Demonstrates how to use `emotify()` to display a simple custom toast notification using a vector emoticon. ```php emotify('success', 'You are awesome, your data was successfully created') ``` -------------------------------- ### Include Notify Messages with Blade Component Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Integrates the notification display component into a Laravel Blade template using the tag syntax for Laravel 8 or greater. ```html ``` -------------------------------- ### Reload Composer Autoload Files Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Updates Composer's autoloader to recognize newly published files and classes. ```sh $ composer dump-autoload ``` -------------------------------- ### Display Smilify Custom Toast Notification Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Shows how to use `smilify()` to display a simple custom toast notification using the smiley emoticon. ```php smilify('success', 'You are successfully reconnected') ``` -------------------------------- ### Override Preset Notification Attributes Source: https://github.com/mckenziearts/laravel-notify/blob/2.x/README.md Shows how to override specific attributes of a preset notification by passing an array of key-value pairs, useful for minor variations. ```php notify()->preset('common-notification', ['title' => 'This is the overridden title']) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.