{"id":13399100,"url":"https://github.com/mckenziearts/laravel-notify","last_synced_at":"2025-05-13T16:06:37.988Z","repository":{"id":38206720,"uuid":"217758926","full_name":"mckenziearts/laravel-notify","owner":"mckenziearts","description":"Flexible Flash notifications for Laravel","archived":false,"fork":false,"pushed_at":"2025-03-12T14:51:45.000Z","size":2279,"stargazers_count":1676,"open_issues_count":16,"forks_count":199,"subscribers_count":33,"default_branch":"2.x","last_synced_at":"2025-04-08T23:12:31.490Z","etag":null,"topics":["flash-messages","laravel","laravel-package","notifications","toast"],"latest_commit_sha":null,"homepage":"","language":"Blade","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mckenziearts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mckenziearts"}},"created_at":"2019-10-26T19:26:47.000Z","updated_at":"2025-04-02T12:59:07.000Z","dependencies_parsed_at":"2022-07-12T10:22:53.085Z","dependency_job_id":"21fb2e0b-71f2-4ae7-a483-3da2b7256ea0","html_url":"https://github.com/mckenziearts/laravel-notify","commit_stats":{"total_commits":124,"total_committers":14,"mean_commits":8.857142857142858,"dds":"0.10483870967741937","last_synced_commit":"fddde15ae2407792f2884e6f9107d49e9e608cbe"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckenziearts%2Flaravel-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckenziearts%2Flaravel-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckenziearts%2Flaravel-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mckenziearts%2Flaravel-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mckenziearts","download_url":"https://codeload.github.com/mckenziearts/laravel-notify/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513380,"owners_count":21443200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flash-messages","laravel","laravel-package","notifications","toast"],"created_at":"2024-07-30T19:00:34.136Z","updated_at":"2025-04-23T20:42:58.504Z","avatar_url":"https://github.com/mckenziearts.png","language":"Blade","funding_links":["https://github.com/sponsors/mckenziearts"],"categories":["Blade"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://laravel.cm/images/laravel-notify.svg\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/mckenziearts/laravel-notify\"\u003e\u003cimg src=\"https://poser.pugx.org/mckenziearts/laravel-notify/d/total.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/mckenziearts/laravel-notify\"\u003e\u003cimg src=\"https://poser.pugx.org/mckenziearts/laravel-notify/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/mckenziearts/laravel-notify\"\u003e\u003cimg src=\"https://poser.pugx.org/mckenziearts/laravel-notify/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\nLaravel Notify is a package that lets you add custom notifications to your project.\nA diverse range of notification design is available.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/mZVVn3L.png\"\u003e\n\u003c/p\u003e\n\n## Android Version\n\nIf you need Android version please try this package [Aesthetic Dialogs](https://github.com/gabriel-TheCode/AestheticDialogs). Happy Coding 👨🏾‍💻\n\n## :film_strip: Video Tutorial \n\n [\u003cimg src=\"https://img.youtube.com/vi/Kq5VXLex7DU/0.jpg\" width=\"250\"\u003e](https://youtu.be/Kq5VXLex7DU)\n \n## Installation\n\nYou can install the package using composer\n\n```sh\n$ composer require mckenziearts/laravel-notify\n```\n\nThen add the service provider to `config/app.php`. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.\n\n```php\n'providers' =\u003e [\n    ...\n    Mckenziearts\\Notify\\LaravelNotifyServiceProvider::class\n    ...\n];\n```\n\nYou can publish the configuration file and assets by running:\n\n```sh\n$ php artisan vendor:publish --provider=\"Mckenziearts\\Notify\\LaravelNotifyServiceProvider\"\n```\n\nNow that we have published a few new files to our application we need to reload them with the following command:\n\n```sh\n$ composer dump-autoload\n```\n\n## Usage\n\n1. Add styles links with `@notifyCss`\n2. Add scripts links with `@notifyJs`\n3. use `notify()` helper function inside your controller to set a toast notification for info, success, warning or error\n4. Include notify partial to your master layout `@include('notify::components.notify')`\n\nIf you are on Laravel 8 or greater, you can use the tag syntax.\n\n```html\n\u003cx:notify-messages /\u003e\n```\n\n### Basic\n\nWithin your controllers, before you perform a redirect call the `notify` method with a message.\n\n```php\npublic function store()\n{\n    notify()-\u003esuccess('Laravel Notify is awesome!');\n\n    return Redirect::home();\n}\n```\n\nA complete example:\n\n```blade\n\u003c!doctype html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eLaravel Notify\u003c/title\u003e\n        @notifyCss\n    \u003c/head\u003e\n    \u003cbody\u003e\n\n\n        \u003cx-notify::notify /\u003e\n        @notifyJs\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Type of notifications\n\nLaravel Notify actually display 5 types of notifications\n\n1. `toast` notification, (The default notification for Laravel Notify)\n\n```php\nnotify()-\u003esuccess('Welcome to Laravel Notify ⚡️') or notify()-\u003esuccess('Welcome to Laravel Notify ⚡️', 'My custom title')\n```\n\n2. `connectify` notification, example of basic usage\n\n```php\nconnectify('success', 'Connection Found', 'Success Message Here')\n```\n\n3. `drakify` (😎) notification, displays an alert only\n\n```php\ndrakify('success') // for success alert\nor\ndrakify('error') // for error alert\n```\n\n4. `smilify` notification, displays a simple custom toast notification using the smiley (😊) emoticon\n\n```php\nsmilify('success', 'You are successfully reconnected')\n```\n\n5. `emotify` notification, displays a simple custom toast notification using a vector emoticon\n\n```php\nemotify('success', 'You are awesome, your data was successfully created')\n```\n\n#### Preset Notifications\n\nIf you have a specific notification that is used across multiple different places in your system, you can define it\nas a preset notification in your config file. This makes it easier to maintain commonly used notifications in one place.\nRead how to define preset messages in the [Config](#config) section below.\n\nAs an example, to use a preset notification you have defined called 'common-notification', use the following:\n\n```php\nnotify()-\u003epreset('common-notification')\n```\n\nYou can override any of the values that are set in the config if you need to. For example, this could be useful if you\nhave a common notification across, but you want to change the icon in one particular place that it's used without having\nto manually write out a new notification.\n\nTo do this, simply pass in an array that has the key of the attribute that you want to override and the value you want\nto override it with.\n\nAs an example, we could override the 'title' of our 'common-notification' by using the following:\n\n```php\nnotify()-\u003epreset('common-notification', ['title' =\u003e 'This is the overridden title'])\n```\n\n## Config\n\nConfig file are located at `config/notify.php` after publishing provider element.\n\nSome awesome stuff. To active `dark mode` update the `theme` config, or add global variable `NOTIFY_THEME` on your .env file\n\n```php\n'theme' =\u003e env('NOTIFY_THEME', 'dark'),\n```\n\nYou can define preset notifications in the config file using the following structure:\n\n```php\n'preset-messages' =\u003e [\n    'user-updated' =\u003e [\n        'message' =\u003e 'The user has been updated successfully.',\n        'type'    =\u003e 'success',\n        'model'   =\u003e 'connect',\n        'title'   =\u003e 'User Updated',\n    ],\n    'user-deleted' =\u003e [\n        'message' =\u003e 'The user has been deleted successfully.',\n        'type'    =\u003e 'success',\n        'model'   =\u003e 'connect',\n        'title'   =\u003e 'User Deleted',\n    ],\n],\n```\n\nThe example above shows the config for two preset notifications: 'user-updated' and 'user-deleted'.\n\n## Change log\n\nPlease see the [changelog](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [contributing.md](CONTRIBUTING.md) for details and a todolist.\n\n## Security\n\nIf you discover any security related issues, please email author email instead of using the issue tracker.\n\n## Credits\n\n- [Arthur Monney][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nlicense. Please see the [license file](LICENCE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/mckenziearts/laravel-notify.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/mckenziearts/laravel-notify.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/mckenziearts/laravel-notify\n[link-downloads]: https://packagist.org/packages/mckenziearts/laravel-notify\n[link-author]: https://twitter.com/MonneyArthur\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmckenziearts%2Flaravel-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmckenziearts%2Flaravel-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmckenziearts%2Flaravel-notify/lists"}