Skip to content

Commit

Permalink
Merge pull request #39 from prologuephp/support-laravel-9
Browse files Browse the repository at this point in the history
add support for Laravel 9, remove support for everything else
  • Loading branch information
tabacitu authored Jan 19, 2022
2 parents e16d87c + e2e3772 commit b2880e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/config": "~5|~6|~7|~8",
"illuminate/session": "~5|~6|~7|~8",
"illuminate/support": "~5|~6|~7|~8"
"illuminate/config": "~9",
"illuminate/session": "~9",
"illuminate/support": "~9"
},
"require-dev": {
"phpunit/phpunit": "~4.1",
Expand All @@ -37,6 +36,11 @@
"Prologue\\Alerts\\Tests\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit --testdox",
"test-failing": "vendor/bin/phpunit --order-by=defects --stop-on-failure",
"test-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text"
},
"minimum-stability": "dev",
"extra": {
"laravel": {
Expand Down
11 changes: 6 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Alerts for Laravel 5, 6, 7 and 8
# Alerts for Laravel 5, 6, 7, 8 and 9

[![Build Status](https://img.shields.io/travis/prologuephp/alerts/master.svg?style=flat-square)](https://travis-ci.org/prologuephp/alerts)
[![Quality Score](https://img.shields.io/scrutinizer/g/prologuephp/alerts.svg?style=flat-square)](https://scrutinizer-ci.com/g/prologuephp/alerts)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](license.md)
[![Packagist Version](https://img.shields.io/packagist/v/prologue/alerts.svg?style=flat-square)](https://packagist.org/packages/prologue/alerts)
[![Total Downloads](https://img.shields.io/packagist/dt/prologue/alerts.svg?style=flat-square)](https://packagist.org/packages/prologue/alerts)

Global site messages in Laravel 8, 7, 6 and 5. Helps trigger notification bubbles with a simple API, both in the current page, and in the next page (using flash data).

Created by [Dries Vints](https://github.com/driesvints) - he first got the idea after [a blog post](http://toddish.co.uk/blog/global-site-messages-in-laravel-4/) by [Todd Francis](http://toddish.co.uk/). This package uses much of the concepts of his blog post as well as the concept of alert levels which [Illuminate's Log package](https://github.com/illuminate/log) uses. Maintained by [Cristian Tabacitu](https://github.com/tabacitu) thanks to its use in [Backpack for Laravel](http://backpackforlaravel.com/).
Global site messages in Laravel 9 - 5. Helps trigger notification bubbles with a simple API, both in the current page, and in the next page (using flash data).

## Table of Contents

Expand Down Expand Up @@ -140,6 +137,10 @@ Alert::count('error'); // Will tell you only the amount of errors and exclude an

If you'd like to learn more ways on how you can display messages, please [take a closer look to Illuminate's `MessageBag` class](https://github.com/illuminate/support/blob/master/MessageBag.php).

## Credits

Created by [Dries Vints](https://github.com/driesvints) - he first got the idea after [a blog post](http://toddish.co.uk/blog/global-site-messages-in-laravel-4/) by [Todd Francis](http://toddish.co.uk/). This package uses much of the concepts of his blog post as well as the concept of alert levels which [Illuminate's Log package](https://github.com/illuminate/log) uses. Maintained by [Cristian Tabacitu](https://github.com/tabacitu) thanks to its use in [Backpack for Laravel](http://backpackforlaravel.com/).

## Changelog

You view the changelog for this package [here](changelog.md).
Expand Down
2 changes: 1 addition & 1 deletion src/AlertsMessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function has($level = null)
*
* @return int
*/
public function count($level = null)
public function count($level = null): int
{
$alerts = $this->session->get($this->getSessionKey());

Expand Down

0 comments on commit b2880e2

Please sign in to comment.