{"id":20980777,"url":"https://github.com/gnahotelsolutions/flasher","last_synced_at":"2025-08-17T13:14:46.110Z","repository":{"id":34924659,"uuid":"190611879","full_name":"gnahotelsolutions/flasher","owner":"gnahotelsolutions","description":"🔦 Flash notification messages into Laravel's Session","archived":false,"fork":false,"pushed_at":"2025-03-13T12:43:16.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-29T22:37:51.794Z","etag":null,"topics":["flashed-messages","flasher","hacktoberfest","laravel","laravel-package","notifications","php"],"latest_commit_sha":null,"homepage":"","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/gnahotelsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2019-06-06T16:11:55.000Z","updated_at":"2025-03-13T12:42:39.000Z","dependencies_parsed_at":"2024-11-19T05:47:45.245Z","dependency_job_id":null,"html_url":"https://github.com/gnahotelsolutions/flasher","commit_stats":{"total_commits":20,"total_committers":5,"mean_commits":4.0,"dds":0.4,"last_synced_commit":"63c319084a03f2e0fd131aa7506dee6b184134a4"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/gnahotelsolutions/flasher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnahotelsolutions%2Fflasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnahotelsolutions%2Fflasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnahotelsolutions%2Fflasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnahotelsolutions%2Fflasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnahotelsolutions","download_url":"https://codeload.github.com/gnahotelsolutions/flasher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnahotelsolutions%2Fflasher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270852206,"owners_count":24656839,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["flashed-messages","flasher","hacktoberfest","laravel","laravel-package","notifications","php"],"created_at":"2024-11-19T05:30:05.684Z","updated_at":"2025-08-17T13:14:46.078Z","avatar_url":"https://github.com/gnahotelsolutions.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flasher\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/gnahotelsolutions/flasher.svg?style=flat-square)](https://packagist.org/packages/gnahotelsolutions/flasher)\n[![Total Downloads](https://img.shields.io/packagist/dt/gnahotelsolutions/flasher.svg?style=flat-square)](https://packagist.org/packages/gnahotelsolutions/flasher)\n![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)\n\n\nThe `gnahotelsolutions/flasher` package provides an easy way to interact with flashed messages in your Laravel application.\n\n## Install\n\nYou can install the package via composer:\n\n```bash\n$ composer require gnahotelsolutions/flasher\n```\n\n## Usage\n\nThe messages are stored in the `notifications` session key.\n\nAll notifications have a default `duration` property set to 5 seconds. You can use this property in your JavaScript to make notifications disappear automatically.\n\n### Creating notifications\n\n```php\nFlasher::info(\"Welcome, {$user-\u003ename}\");\n\nFlasher::error('Incorrect password');\n\nFlasher::warning('Remember to change your password');\n\nFlasher::success('Password changed!');\n```\n\nIf you want to use custom types, you can use the method `createNotification`\n\n```php\nFlasher::createNotification('store', 'Someone bought a product!', null);\n```\n\n### Check if there are pending notifications\n\n```php\n@if (Flasher::any())\n    \u003cdiv class=\"alerts\"\u003e\n        ...\n    \u003c/div\u003e\n@endif\n``` \n\n### Iterating over notifications\n\n```php\n@foreach(Flasher::all() as $notification)\n    \u003cdiv class=\"alert alert-{{ $notification-\u003egetType() }}\" data-duration=\"{{ $notification-\u003egetDuration() }}\"\u003e\n        {{ $notification-\u003egetMessage() }}\n    \u003c/div\u003e \n@endforeach\n```\n\nIf you're using [Bootstrap](https://getbootstrap.com) in your project, you can use `getBootstrapClass()` method. \nIt will replace `error` with `danger` to match the framework's CSS class.\n\n## Testing\n\n``` bash\nphpunit\n```\n\n## Security\n\nIf you discover any security related issues, please email dllop@gna.es instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnahotelsolutions%2Fflasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnahotelsolutions%2Fflasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnahotelsolutions%2Fflasher/lists"}