{"id":15190079,"url":"https://github.com/ipunkt/laravel-notify","last_synced_at":"2025-10-02T04:31:54.191Z","repository":{"id":18431598,"uuid":"21616641","full_name":"ipunkt/laravel-notify","owner":"ipunkt","description":"Provides an ready to use object oriented notification interface for laravel 4, including working example javascript and css for Twitter Bootstrap 3","archived":true,"fork":false,"pushed_at":"2019-02-01T12:56:21.000Z","size":58,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-15T07:05:37.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipunkt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-08T14:50:40.000Z","updated_at":"2023-02-28T11:31:06.000Z","dependencies_parsed_at":"2022-08-04T23:30:44.507Z","dependency_job_id":null,"html_url":"https://github.com/ipunkt/laravel-notify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipunkt%2Flaravel-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipunkt","download_url":"https://codeload.github.com/ipunkt/laravel-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234934664,"owners_count":18909707,"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":[],"created_at":"2024-09-27T20:04:20.845Z","updated_at":"2025-10-02T04:31:48.896Z","avatar_url":"https://github.com/ipunkt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-notify\n[![Latest Stable Version](https://poser.pugx.org/ipunkt/laravel-notify/v/stable.svg)](https://packagist.org/packages/ipunkt/laravel-notify) [![Latest Unstable Version](https://poser.pugx.org/ipunkt/laravel-notify/v/unstable.svg)](https://packagist.org/packages/ipunkt/laravel-notify) [![License](https://poser.pugx.org/ipunkt/laravel-notify/license.svg)](https://packagist.org/packages/ipunkt/laravel-notify) [![Total Downloads](https://poser.pugx.org/ipunkt/laravel-notify/downloads.svg)](https://packagist.org/packages/ipunkt/laravel-notify)\n\nProvides an ready to use object oriented notification interface for laravel 4, including working example javascript and css for Twitter Bootstrap 3\n\n## Installation\n\nAdd to your composer.json following lines\n\n\t\"require\": {\n\t\t\"ipunkt/laravel-notify\": \"1.*\"\n\t}\n\nAdd `'Ipunkt\\LaravelNotify\\LaravelNotifyServiceProvider',` to `providers` in `app/config/app.php`.\nThe Service provider also registers an alias `Notify` to your application.\n\nOn command line publish the database migrations:\n\n\t$\u003e php artisan migrate --package=\"ipunkt/laravel-notify\"\n\n## Usage\n\nAdd somewhere in your bootstrap the shipped view composer to auto-handle the given view script:\n\n\tView::composer('laravel-notify::notification', 'Ipunkt\\LaravelNotify\\Composers\\ViewComposer');\n\nThe view composer injects a variable `$notifications` into the view. It is a collection of all notifications that\n\twere created or read.\n\nNow you can use this template to display all notifications or you can use it with Bootstrap 3 in your navbar like\n\tthis.\n\n\t$\u003e php artisan asset:publish ipunkt/laravel-notify\n\nAnd then include the following files in your layout: `/packages/ipunkt/laravel-notify/css/notify.css` and\n\t`/packages/ipunkt/laravel-notify/js/notify.js`. The latter needs jquery to be existent.\n\nThen go to your layout and create an `\u003cli id=\"notify\"\u003e\u003ca href=\"{{{ URL::route('notify.index') }}}\"\u003e\u003ci class=\"glyphicon glyphicon-warning-sign\"\u003e\u003c/i\u003e\u003c/li\u003e`\n\tin your navbar navigation list.\n\nWhenever there are notifications to be listed the ViewComposer initially fills the `$notifications` variable in the\n\tshipped `notification` view and the javascript makes an ajax call to get these and displays as menu. Without\n\tjavascript the link opens a page where all notifications will be listed.\n\n\n### Important Notice\n\nDo not forget to set filters for the routes build by the package.\nFor example:\n\n\tRoute::when('notify/*', 'auth');\n\nThis example adds the `auth` filter to all package build routes.\n\n## Use-Cases\n### 1. Message Notification\n\nIf you want to publish a simple message notification just do the following to notify users:\n\n\t$user = Auth::user();\n\tNotify::user($user, new \\Ipunkt\\LaravelNotify\\Types\\MessageNotification('Welcome on board!'));\n\t// or\n\t// Notify::users([$user, ...], new \\Ipunkt\\LaravelNotify\\Types\\MessageNotification('Welcome on board!'));\n\nThis sends a simple shipped message notification to the current logged in user.\n\n### 2. Specific Notification\n\nFor sending application specific notifications simply create your own NotificationType.\n\n\tclass MyNotification extends Ipunkt\\LaravelNotify\\Types\\AbstractNotification {\n\t}\n\nThen you can modify the read and done action for your needs. And you can add your own custom actions. You do not have to\n use only these 3 actions: `created`, `read`, `done`. You can build your own custom workflow. Try it out!\n\nThe AbstractNotification sends a user to the done action if he reads the notification. Override this behaviour to have\n your own workflow. Ending with `done` might be a good one, starting with `created` is fix by the current implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Flaravel-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipunkt%2Flaravel-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipunkt%2Flaravel-notify/lists"}