├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── config └── config.php ├── helpers └── helpers.php ├── src ├── Facades │ └── Toastr.php ├── Toastr.php └── ToastrServiceProvider.php └── toastr.png /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /vendor 3 | /.idea 4 | /.vscode 5 | *.log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Talles Gazel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Toastr notifications for laravel 5.5+, 6 and 7 2 | 3 | [![Latest Stable Version](https://poser.pugx.org/tjgazel/laravel-toastr/v/stable)](https://packagist.org/packages/tjgazel/laravel-toastr) 4 | [![License](https://poser.pugx.org/tjgazel/laravel-toastr/license)](https://github.com/tjgazel/laravel-toastr/blob/master/LICENSE) 5 | [![Total Downloads](https://poser.pugx.org/tjgazel/laravel-toastr/downloads)](https://packagist.org/packages/tjgazel/laravel-toastr) 6 | 7 | 8 | 9 |
10 | 11 | - [Instalation](#instalation) 12 | - [Usage](#usage) 13 | - [Tanks](#tanks) 14 | - [Tutorial video](#tutorial) 15 | 16 | **Other packages:** 17 | 18 | - [tjgazel/laravel-bs4-alert](https://github.com/tjgazel/laravel-bs4-alert) - Bootstrap 4 alerts for laravel 5.\*
19 | - [tjgazel/laravel-bs3-alert](https://github.com/tjgazel/laravel-bs3-alert) - Bootstrap 3 alerts for laravel 5.\* 20 | 21 |
22 | 23 | 24 | 25 | ## Installation 26 | 27 | ### 1) Install the Toastr library (front end dependency) 28 | 29 | **1.1)** Install [Toastr](http://codeseven.github.io/toastr/) via npm . [Github](https://github.com/CodeSeven/toastr) | [Demo](http://codeseven.github.io/toastr/demo.html) 30 | 31 | ``` 32 | npm install toastr --save-dev 33 | ``` 34 | 35 |
36 | 37 | **1.2)** Require the js in resources/assets/js/bootstrap.js as `window.toastr = require('toastr');` 38 | 39 | ``` 40 | try { 41 | window.$ = window.jQuery = require('jquery'); 42 | 43 | require('bootstrap'); 44 | 45 | window.toastr = require('toastr'); 46 | 47 | } catch (e) { } 48 | ``` 49 | 50 |
51 | 52 | **1.3)** Import the sass in resources/assets/sass/app.scss as `@import "~toastr/toastr";` then build via npm `npm run prod`. 53 | 54 | ``` 55 | // Fonts 56 | @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700"); 57 | 58 | // Variables 59 | @import "variables"; 60 | 61 | // Bootstrap 62 | @import "~bootstrap/scss/bootstrap"; 63 | 64 | // Toastr 65 | @import "~toastr/toastr"; 66 | ``` 67 | 68 |

69 | 70 | ### 2) Install tjgazel/laravel-toastr 71 | 72 | **2.1)** Run 73 | 74 | ```bash 75 | composer require tjgazel/laravel-toastr 76 | ``` 77 | 78 |
79 | 80 | **2.2)** _Optional:_ Laravel 5.4 and below
81 | Add `TJGazel\Toastr\ToastrServiceProvider::class` to `providers` in `config/app.php`.
82 | Add `'Toastr' => TJGazel\Toastr\Facades\Toastr::class` to `aliases` in `config/app.php`.
83 | 84 | ``` 85 | // config/app.php 86 | 87 | 'providers' => [ 88 | // ... 89 | TJGazel\Toastr\ToastrServiceProvider::class, 90 | ], 91 | 92 | 'aliases' => [ 93 | // ... 94 | 'Toastr' => TJGazel\Toastr\Facades\Toastr::class, 95 | ], 96 | ``` 97 | 98 |
99 | 100 | **2.3)** Run `php artisan vendor:publish --provider="TJGazel\Toastr\ToastrServiceProvider"` 101 | to publish the config file in `config/toastr.php` 102 | 103 |
104 | 105 | **2.4)** Add `{!! Toastr::render() !!}` Facade or `{!! toastr()->render() !!}` helper in your main view. 106 | 107 | ``` 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 |
116 | 117 | {!! toastr()->render() !!} 118 | 119 | 120 | ``` 121 | 122 |
123 | 124 | **2.5)** _Optional:_ Modify the publish configuration file locate at `config/toastr.php` to your liking. 125 | 126 | ``` 127 | 'toastr', 132 | 133 | 'options' => [ 134 | "closeButton" => true, 135 | "debug" => false, 136 | "newestOnTop" => false, 137 | "progressBar" => true, 138 | "positionClass" => "toast-bottom-right", 139 | "preventDuplicates" => false, 140 | "onclick" => null, 141 | "showDuration" => "300", 142 | "hideDuration" => "1000", 143 | "timeOut" => "10000", 144 | "extendedTimeOut" => "1000", 145 | "showEasing" => "swing", 146 | "hideEasing" => "linear", 147 | "showMethod" => "fadeIn", 148 | "hideMethod" => "fadeOut" 149 | ] 150 | 151 | ]; 152 | ``` 153 | 154 |

155 | 156 | 157 | 158 | ## Usage 159 | 160 | Use the Toastr facade `Toastr::` or the helper function `toast()->` to access the methods in this package. 161 | 162 | ``` 163 | Toastr::error(string $message, string $title = null, array $options = []); 164 | 165 | toastr()->error(string $message, string $title = null, array $options = []); 166 | ``` 167 | 168 |
169 | 170 | **Examples:** 171 | 172 | ``` 173 | 193 | 194 | You can also chain multiple messages together using: 195 | 196 | ``` 197 | toastr() 198 | ->error('Unauthorized!', 'Error 401') 199 | ->info('Authentication required to access dashboard page', null, ['timeOut' => 15000]); 200 | ``` 201 | 202 | Note that in the `3rd parameter` you can customize `toastr options`. See the `config/toastr.php` file for all possibilities. 203 | 204 |
205 | 206 | **All methods**
207 | 208 | ``` 209 | toastr()->info(); 210 | toastr()->warning(); 211 | toastr()->success(); 212 | toastr()->error(); 213 | ``` 214 | 215 |
216 | 217 | 218 | 219 | ### Tanks for: 220 | 221 | [Toastr](http://codeseven.github.io/toastr/)
222 | [Laravel](https://laravel.com/) 223 | 224 | **Author:** Talles Gazel
225 | [Home page](https://tjgweb.com.br/)
226 | [Facebook](https://www.facebook.com/talles.gazel)
227 | 228 | 229 | [![Tutorial video](https://img.youtube.com/vi/_6Uu76LqGds/0.jpg)](https://www.youtube.com/watch?v=_6Uu76LqGds) 230 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tjgazel/laravel-toastr", 3 | "description": "Toastr notifications for laravel 5.5+, 6 and 7", 4 | "keywords": [ 5 | "toastr", 6 | "laravel", 7 | "notification", 8 | "facade", 9 | "helper", 10 | "auto discover", 11 | "php" 12 | ], 13 | "homepage": "https://github.com/tjgazel/laravel-toastr", 14 | "license": "MIT", 15 | "type": "package", 16 | "authors": [ 17 | { 18 | "name": "Talles Gazel", 19 | "email": "tjgazel@gmail.com" 20 | } 21 | ], 22 | "require": { 23 | "php": ">=7.0" 24 | }, 25 | "require-dev": { 26 | "illuminate/support": "^5.5.0", 27 | "illuminate/session": "^5.5.0" 28 | }, 29 | "autoload": { 30 | "files": [ 31 | "helpers/helpers.php" 32 | ], 33 | "psr-4": { 34 | "TJGazel\\Toastr\\": "src/" 35 | } 36 | }, 37 | "minimum-stability": "stable", 38 | "extra": { 39 | "laravel": { 40 | "providers": [ 41 | "TJGazel\\Toastr\\ToastrServiceProvider" 42 | ], 43 | "aliases": { 44 | "Toastr": "TJGazel\\Toastr\\Facades\\Toastr" 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "f648616e0432d887d053919a89d9bce7", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "doctrine/inflector", 12 | "version": "1.4.3", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/doctrine/inflector.git", 16 | "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/4650c8b30c753a76bf44fb2ed00117d6f367490c", 21 | "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": "^7.2 || ^8.0" 26 | }, 27 | "require-dev": { 28 | "doctrine/coding-standard": "^7.0", 29 | "phpstan/phpstan": "^0.11", 30 | "phpstan/phpstan-phpunit": "^0.11", 31 | "phpstan/phpstan-strict-rules": "^0.11", 32 | "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" 33 | }, 34 | "type": "library", 35 | "extra": { 36 | "branch-alias": { 37 | "dev-master": "2.0.x-dev" 38 | } 39 | }, 40 | "autoload": { 41 | "psr-4": { 42 | "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", 43 | "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" 44 | } 45 | }, 46 | "notification-url": "https://packagist.org/downloads/", 47 | "license": [ 48 | "MIT" 49 | ], 50 | "authors": [ 51 | { 52 | "name": "Guilherme Blanco", 53 | "email": "guilhermeblanco@gmail.com" 54 | }, 55 | { 56 | "name": "Roman Borschel", 57 | "email": "roman@code-factory.org" 58 | }, 59 | { 60 | "name": "Benjamin Eberlei", 61 | "email": "kontakt@beberlei.de" 62 | }, 63 | { 64 | "name": "Jonathan Wage", 65 | "email": "jonwage@gmail.com" 66 | }, 67 | { 68 | "name": "Johannes Schmitt", 69 | "email": "schmittjoh@gmail.com" 70 | } 71 | ], 72 | "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", 73 | "homepage": "https://www.doctrine-project.org/projects/inflector.html", 74 | "keywords": [ 75 | "inflection", 76 | "inflector", 77 | "lowercase", 78 | "manipulation", 79 | "php", 80 | "plural", 81 | "singular", 82 | "strings", 83 | "uppercase", 84 | "words" 85 | ], 86 | "funding": [ 87 | { 88 | "url": "https://www.doctrine-project.org/sponsorship.html", 89 | "type": "custom" 90 | }, 91 | { 92 | "url": "https://www.patreon.com/phpdoctrine", 93 | "type": "patreon" 94 | }, 95 | { 96 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", 97 | "type": "tidelift" 98 | } 99 | ], 100 | "time": "2020-05-29T07:19:59+00:00" 101 | }, 102 | { 103 | "name": "illuminate/contracts", 104 | "version": "v5.8.36", 105 | "source": { 106 | "type": "git", 107 | "url": "https://github.com/illuminate/contracts.git", 108 | "reference": "00fc6afee788fa07c311b0650ad276585f8aef96" 109 | }, 110 | "dist": { 111 | "type": "zip", 112 | "url": "https://api.github.com/repos/illuminate/contracts/zipball/00fc6afee788fa07c311b0650ad276585f8aef96", 113 | "reference": "00fc6afee788fa07c311b0650ad276585f8aef96", 114 | "shasum": "" 115 | }, 116 | "require": { 117 | "php": "^7.1.3", 118 | "psr/container": "^1.0", 119 | "psr/simple-cache": "^1.0" 120 | }, 121 | "type": "library", 122 | "extra": { 123 | "branch-alias": { 124 | "dev-master": "5.8-dev" 125 | } 126 | }, 127 | "autoload": { 128 | "psr-4": { 129 | "Illuminate\\Contracts\\": "" 130 | } 131 | }, 132 | "notification-url": "https://packagist.org/downloads/", 133 | "license": [ 134 | "MIT" 135 | ], 136 | "authors": [ 137 | { 138 | "name": "Taylor Otwell", 139 | "email": "taylor@laravel.com" 140 | } 141 | ], 142 | "description": "The Illuminate Contracts package.", 143 | "homepage": "https://laravel.com", 144 | "time": "2019-07-30T13:57:21+00:00" 145 | }, 146 | { 147 | "name": "illuminate/filesystem", 148 | "version": "v5.8.36", 149 | "source": { 150 | "type": "git", 151 | "url": "https://github.com/illuminate/filesystem.git", 152 | "reference": "494ba903402d64ec49c8d869ab61791db34b2288" 153 | }, 154 | "dist": { 155 | "type": "zip", 156 | "url": "https://api.github.com/repos/illuminate/filesystem/zipball/494ba903402d64ec49c8d869ab61791db34b2288", 157 | "reference": "494ba903402d64ec49c8d869ab61791db34b2288", 158 | "shasum": "" 159 | }, 160 | "require": { 161 | "illuminate/contracts": "5.8.*", 162 | "illuminate/support": "5.8.*", 163 | "php": "^7.1.3", 164 | "symfony/finder": "^4.2" 165 | }, 166 | "suggest": { 167 | "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).", 168 | "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", 169 | "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", 170 | "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", 171 | "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)." 172 | }, 173 | "type": "library", 174 | "extra": { 175 | "branch-alias": { 176 | "dev-master": "5.8-dev" 177 | } 178 | }, 179 | "autoload": { 180 | "psr-4": { 181 | "Illuminate\\Filesystem\\": "" 182 | } 183 | }, 184 | "notification-url": "https://packagist.org/downloads/", 185 | "license": [ 186 | "MIT" 187 | ], 188 | "authors": [ 189 | { 190 | "name": "Taylor Otwell", 191 | "email": "taylor@laravel.com" 192 | } 193 | ], 194 | "description": "The Illuminate Filesystem package.", 195 | "homepage": "https://laravel.com", 196 | "time": "2019-08-14T13:38:15+00:00" 197 | }, 198 | { 199 | "name": "illuminate/session", 200 | "version": "v5.8.36", 201 | "source": { 202 | "type": "git", 203 | "url": "https://github.com/illuminate/session.git", 204 | "reference": "087d360f7b9d75bc964280b890c2f2fe8efaf71f" 205 | }, 206 | "dist": { 207 | "type": "zip", 208 | "url": "https://api.github.com/repos/illuminate/session/zipball/087d360f7b9d75bc964280b890c2f2fe8efaf71f", 209 | "reference": "087d360f7b9d75bc964280b890c2f2fe8efaf71f", 210 | "shasum": "" 211 | }, 212 | "require": { 213 | "ext-json": "*", 214 | "illuminate/contracts": "5.8.*", 215 | "illuminate/filesystem": "5.8.*", 216 | "illuminate/support": "5.8.*", 217 | "php": "^7.1.3", 218 | "symfony/finder": "^4.2", 219 | "symfony/http-foundation": "^4.2" 220 | }, 221 | "suggest": { 222 | "illuminate/console": "Required to use the session:table command (5.8.*)." 223 | }, 224 | "type": "library", 225 | "extra": { 226 | "branch-alias": { 227 | "dev-master": "5.8-dev" 228 | } 229 | }, 230 | "autoload": { 231 | "psr-4": { 232 | "Illuminate\\Session\\": "" 233 | } 234 | }, 235 | "notification-url": "https://packagist.org/downloads/", 236 | "license": [ 237 | "MIT" 238 | ], 239 | "authors": [ 240 | { 241 | "name": "Taylor Otwell", 242 | "email": "taylor@laravel.com" 243 | } 244 | ], 245 | "description": "The Illuminate Session package.", 246 | "homepage": "https://laravel.com", 247 | "time": "2019-07-08T13:48:55+00:00" 248 | }, 249 | { 250 | "name": "illuminate/support", 251 | "version": "v5.8.36", 252 | "source": { 253 | "type": "git", 254 | "url": "https://github.com/illuminate/support.git", 255 | "reference": "df4af6a32908f1d89d74348624b57e3233eea247" 256 | }, 257 | "dist": { 258 | "type": "zip", 259 | "url": "https://api.github.com/repos/illuminate/support/zipball/df4af6a32908f1d89d74348624b57e3233eea247", 260 | "reference": "df4af6a32908f1d89d74348624b57e3233eea247", 261 | "shasum": "" 262 | }, 263 | "require": { 264 | "doctrine/inflector": "^1.1", 265 | "ext-json": "*", 266 | "ext-mbstring": "*", 267 | "illuminate/contracts": "5.8.*", 268 | "nesbot/carbon": "^1.26.3 || ^2.0", 269 | "php": "^7.1.3" 270 | }, 271 | "conflict": { 272 | "tightenco/collect": "<5.5.33" 273 | }, 274 | "suggest": { 275 | "illuminate/filesystem": "Required to use the composer class (5.8.*).", 276 | "moontoast/math": "Required to use ordered UUIDs (^1.1).", 277 | "ramsey/uuid": "Required to use Str::uuid() (^3.7).", 278 | "symfony/process": "Required to use the composer class (^4.2).", 279 | "symfony/var-dumper": "Required to use the dd function (^4.2).", 280 | "vlucas/phpdotenv": "Required to use the env helper (^3.3)." 281 | }, 282 | "type": "library", 283 | "extra": { 284 | "branch-alias": { 285 | "dev-master": "5.8-dev" 286 | } 287 | }, 288 | "autoload": { 289 | "psr-4": { 290 | "Illuminate\\Support\\": "" 291 | }, 292 | "files": [ 293 | "helpers.php" 294 | ] 295 | }, 296 | "notification-url": "https://packagist.org/downloads/", 297 | "license": [ 298 | "MIT" 299 | ], 300 | "authors": [ 301 | { 302 | "name": "Taylor Otwell", 303 | "email": "taylor@laravel.com" 304 | } 305 | ], 306 | "description": "The Illuminate Support package.", 307 | "homepage": "https://laravel.com", 308 | "time": "2019-12-12T14:16:47+00:00" 309 | }, 310 | { 311 | "name": "nesbot/carbon", 312 | "version": "2.39.0", 313 | "source": { 314 | "type": "git", 315 | "url": "https://github.com/briannesbitt/Carbon.git", 316 | "reference": "0a41ea7f7fedacf307b7a339800e10356a042918" 317 | }, 318 | "dist": { 319 | "type": "zip", 320 | "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0a41ea7f7fedacf307b7a339800e10356a042918", 321 | "reference": "0a41ea7f7fedacf307b7a339800e10356a042918", 322 | "shasum": "" 323 | }, 324 | "require": { 325 | "ext-json": "*", 326 | "php": "^7.1.8 || ^8.0", 327 | "symfony/polyfill-mbstring": "^1.0", 328 | "symfony/translation": "^3.4 || ^4.0 || ^5.0" 329 | }, 330 | "require-dev": { 331 | "doctrine/orm": "^2.7", 332 | "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", 333 | "kylekatarnls/multi-tester": "^2.0", 334 | "phpmd/phpmd": "^2.8", 335 | "phpstan/extension-installer": "^1.0", 336 | "phpstan/phpstan": "^0.12.35", 337 | "phpunit/phpunit": "^7.5 || ^8.0", 338 | "squizlabs/php_codesniffer": "^3.4" 339 | }, 340 | "bin": [ 341 | "bin/carbon" 342 | ], 343 | "type": "library", 344 | "extra": { 345 | "branch-alias": { 346 | "dev-master": "2.x-dev", 347 | "dev-3.x": "3.x-dev" 348 | }, 349 | "laravel": { 350 | "providers": [ 351 | "Carbon\\Laravel\\ServiceProvider" 352 | ] 353 | }, 354 | "phpstan": { 355 | "includes": [ 356 | "extension.neon" 357 | ] 358 | } 359 | }, 360 | "autoload": { 361 | "psr-4": { 362 | "Carbon\\": "src/Carbon/" 363 | } 364 | }, 365 | "notification-url": "https://packagist.org/downloads/", 366 | "license": [ 367 | "MIT" 368 | ], 369 | "authors": [ 370 | { 371 | "name": "Brian Nesbitt", 372 | "email": "brian@nesbot.com", 373 | "homepage": "http://nesbot.com" 374 | }, 375 | { 376 | "name": "kylekatarnls", 377 | "homepage": "http://github.com/kylekatarnls" 378 | } 379 | ], 380 | "description": "An API extension for DateTime that supports 281 different languages.", 381 | "homepage": "http://carbon.nesbot.com", 382 | "keywords": [ 383 | "date", 384 | "datetime", 385 | "time" 386 | ], 387 | "funding": [ 388 | { 389 | "url": "https://opencollective.com/Carbon", 390 | "type": "open_collective" 391 | }, 392 | { 393 | "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", 394 | "type": "tidelift" 395 | } 396 | ], 397 | "time": "2020-08-24T12:35:58+00:00" 398 | }, 399 | { 400 | "name": "paragonie/random_compat", 401 | "version": "v9.99.99", 402 | "source": { 403 | "type": "git", 404 | "url": "https://github.com/paragonie/random_compat.git", 405 | "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" 406 | }, 407 | "dist": { 408 | "type": "zip", 409 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", 410 | "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", 411 | "shasum": "" 412 | }, 413 | "require": { 414 | "php": "^7" 415 | }, 416 | "require-dev": { 417 | "phpunit/phpunit": "4.*|5.*", 418 | "vimeo/psalm": "^1" 419 | }, 420 | "suggest": { 421 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 422 | }, 423 | "type": "library", 424 | "notification-url": "https://packagist.org/downloads/", 425 | "license": [ 426 | "MIT" 427 | ], 428 | "authors": [ 429 | { 430 | "name": "Paragon Initiative Enterprises", 431 | "email": "security@paragonie.com", 432 | "homepage": "https://paragonie.com" 433 | } 434 | ], 435 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 436 | "keywords": [ 437 | "csprng", 438 | "polyfill", 439 | "pseudorandom", 440 | "random" 441 | ], 442 | "time": "2018-07-02T15:55:56+00:00" 443 | }, 444 | { 445 | "name": "psr/container", 446 | "version": "1.0.0", 447 | "source": { 448 | "type": "git", 449 | "url": "https://github.com/php-fig/container.git", 450 | "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" 451 | }, 452 | "dist": { 453 | "type": "zip", 454 | "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", 455 | "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", 456 | "shasum": "" 457 | }, 458 | "require": { 459 | "php": ">=5.3.0" 460 | }, 461 | "type": "library", 462 | "extra": { 463 | "branch-alias": { 464 | "dev-master": "1.0.x-dev" 465 | } 466 | }, 467 | "autoload": { 468 | "psr-4": { 469 | "Psr\\Container\\": "src/" 470 | } 471 | }, 472 | "notification-url": "https://packagist.org/downloads/", 473 | "license": [ 474 | "MIT" 475 | ], 476 | "authors": [ 477 | { 478 | "name": "PHP-FIG", 479 | "homepage": "http://www.php-fig.org/" 480 | } 481 | ], 482 | "description": "Common Container Interface (PHP FIG PSR-11)", 483 | "homepage": "https://github.com/php-fig/container", 484 | "keywords": [ 485 | "PSR-11", 486 | "container", 487 | "container-interface", 488 | "container-interop", 489 | "psr" 490 | ], 491 | "time": "2017-02-14T16:28:37+00:00" 492 | }, 493 | { 494 | "name": "psr/simple-cache", 495 | "version": "1.0.1", 496 | "source": { 497 | "type": "git", 498 | "url": "https://github.com/php-fig/simple-cache.git", 499 | "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" 500 | }, 501 | "dist": { 502 | "type": "zip", 503 | "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", 504 | "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", 505 | "shasum": "" 506 | }, 507 | "require": { 508 | "php": ">=5.3.0" 509 | }, 510 | "type": "library", 511 | "extra": { 512 | "branch-alias": { 513 | "dev-master": "1.0.x-dev" 514 | } 515 | }, 516 | "autoload": { 517 | "psr-4": { 518 | "Psr\\SimpleCache\\": "src/" 519 | } 520 | }, 521 | "notification-url": "https://packagist.org/downloads/", 522 | "license": [ 523 | "MIT" 524 | ], 525 | "authors": [ 526 | { 527 | "name": "PHP-FIG", 528 | "homepage": "http://www.php-fig.org/" 529 | } 530 | ], 531 | "description": "Common interfaces for simple caching", 532 | "keywords": [ 533 | "cache", 534 | "caching", 535 | "psr", 536 | "psr-16", 537 | "simple-cache" 538 | ], 539 | "time": "2017-10-23T01:57:42+00:00" 540 | }, 541 | { 542 | "name": "symfony/finder", 543 | "version": "v4.4.13", 544 | "source": { 545 | "type": "git", 546 | "url": "https://github.com/symfony/finder.git", 547 | "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7" 548 | }, 549 | "dist": { 550 | "type": "zip", 551 | "url": "https://api.github.com/repos/symfony/finder/zipball/2a78590b2c7e3de5c429628457c47541c58db9c7", 552 | "reference": "2a78590b2c7e3de5c429628457c47541c58db9c7", 553 | "shasum": "" 554 | }, 555 | "require": { 556 | "php": ">=7.1.3" 557 | }, 558 | "type": "library", 559 | "extra": { 560 | "branch-alias": { 561 | "dev-master": "4.4-dev" 562 | } 563 | }, 564 | "autoload": { 565 | "psr-4": { 566 | "Symfony\\Component\\Finder\\": "" 567 | }, 568 | "exclude-from-classmap": [ 569 | "/Tests/" 570 | ] 571 | }, 572 | "notification-url": "https://packagist.org/downloads/", 573 | "license": [ 574 | "MIT" 575 | ], 576 | "authors": [ 577 | { 578 | "name": "Fabien Potencier", 579 | "email": "fabien@symfony.com" 580 | }, 581 | { 582 | "name": "Symfony Community", 583 | "homepage": "https://symfony.com/contributors" 584 | } 585 | ], 586 | "description": "Symfony Finder Component", 587 | "homepage": "https://symfony.com", 588 | "funding": [ 589 | { 590 | "url": "https://symfony.com/sponsor", 591 | "type": "custom" 592 | }, 593 | { 594 | "url": "https://github.com/fabpot", 595 | "type": "github" 596 | }, 597 | { 598 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 599 | "type": "tidelift" 600 | } 601 | ], 602 | "time": "2020-08-17T09:56:45+00:00" 603 | }, 604 | { 605 | "name": "symfony/http-foundation", 606 | "version": "v4.4.13", 607 | "source": { 608 | "type": "git", 609 | "url": "https://github.com/symfony/http-foundation.git", 610 | "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1" 611 | }, 612 | "dist": { 613 | "type": "zip", 614 | "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e3e5a62a6631a461954d471e7206e3750dbe8ee1", 615 | "reference": "e3e5a62a6631a461954d471e7206e3750dbe8ee1", 616 | "shasum": "" 617 | }, 618 | "require": { 619 | "php": ">=7.1.3", 620 | "symfony/mime": "^4.3|^5.0", 621 | "symfony/polyfill-mbstring": "~1.1" 622 | }, 623 | "require-dev": { 624 | "predis/predis": "~1.0", 625 | "symfony/expression-language": "^3.4|^4.0|^5.0" 626 | }, 627 | "type": "library", 628 | "extra": { 629 | "branch-alias": { 630 | "dev-master": "4.4-dev" 631 | } 632 | }, 633 | "autoload": { 634 | "psr-4": { 635 | "Symfony\\Component\\HttpFoundation\\": "" 636 | }, 637 | "exclude-from-classmap": [ 638 | "/Tests/" 639 | ] 640 | }, 641 | "notification-url": "https://packagist.org/downloads/", 642 | "license": [ 643 | "MIT" 644 | ], 645 | "authors": [ 646 | { 647 | "name": "Fabien Potencier", 648 | "email": "fabien@symfony.com" 649 | }, 650 | { 651 | "name": "Symfony Community", 652 | "homepage": "https://symfony.com/contributors" 653 | } 654 | ], 655 | "description": "Symfony HttpFoundation Component", 656 | "homepage": "https://symfony.com", 657 | "funding": [ 658 | { 659 | "url": "https://symfony.com/sponsor", 660 | "type": "custom" 661 | }, 662 | { 663 | "url": "https://github.com/fabpot", 664 | "type": "github" 665 | }, 666 | { 667 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 668 | "type": "tidelift" 669 | } 670 | ], 671 | "time": "2020-08-17T07:39:58+00:00" 672 | }, 673 | { 674 | "name": "symfony/mime", 675 | "version": "v5.1.5", 676 | "source": { 677 | "type": "git", 678 | "url": "https://github.com/symfony/mime.git", 679 | "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc" 680 | }, 681 | "dist": { 682 | "type": "zip", 683 | "url": "https://api.github.com/repos/symfony/mime/zipball/89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", 684 | "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", 685 | "shasum": "" 686 | }, 687 | "require": { 688 | "php": ">=7.2.5", 689 | "symfony/polyfill-intl-idn": "^1.10", 690 | "symfony/polyfill-mbstring": "^1.0", 691 | "symfony/polyfill-php80": "^1.15" 692 | }, 693 | "conflict": { 694 | "symfony/mailer": "<4.4" 695 | }, 696 | "require-dev": { 697 | "egulias/email-validator": "^2.1.10", 698 | "symfony/dependency-injection": "^4.4|^5.0" 699 | }, 700 | "type": "library", 701 | "extra": { 702 | "branch-alias": { 703 | "dev-master": "5.1-dev" 704 | } 705 | }, 706 | "autoload": { 707 | "psr-4": { 708 | "Symfony\\Component\\Mime\\": "" 709 | }, 710 | "exclude-from-classmap": [ 711 | "/Tests/" 712 | ] 713 | }, 714 | "notification-url": "https://packagist.org/downloads/", 715 | "license": [ 716 | "MIT" 717 | ], 718 | "authors": [ 719 | { 720 | "name": "Fabien Potencier", 721 | "email": "fabien@symfony.com" 722 | }, 723 | { 724 | "name": "Symfony Community", 725 | "homepage": "https://symfony.com/contributors" 726 | } 727 | ], 728 | "description": "A library to manipulate MIME messages", 729 | "homepage": "https://symfony.com", 730 | "keywords": [ 731 | "mime", 732 | "mime-type" 733 | ], 734 | "funding": [ 735 | { 736 | "url": "https://symfony.com/sponsor", 737 | "type": "custom" 738 | }, 739 | { 740 | "url": "https://github.com/fabpot", 741 | "type": "github" 742 | }, 743 | { 744 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 745 | "type": "tidelift" 746 | } 747 | ], 748 | "time": "2020-08-17T10:01:29+00:00" 749 | }, 750 | { 751 | "name": "symfony/polyfill-intl-idn", 752 | "version": "v1.18.1", 753 | "source": { 754 | "type": "git", 755 | "url": "https://github.com/symfony/polyfill-intl-idn.git", 756 | "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" 757 | }, 758 | "dist": { 759 | "type": "zip", 760 | "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", 761 | "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", 762 | "shasum": "" 763 | }, 764 | "require": { 765 | "php": ">=5.3.3", 766 | "symfony/polyfill-intl-normalizer": "^1.10", 767 | "symfony/polyfill-php70": "^1.10", 768 | "symfony/polyfill-php72": "^1.10" 769 | }, 770 | "suggest": { 771 | "ext-intl": "For best performance" 772 | }, 773 | "type": "library", 774 | "extra": { 775 | "branch-alias": { 776 | "dev-master": "1.18-dev" 777 | }, 778 | "thanks": { 779 | "name": "symfony/polyfill", 780 | "url": "https://github.com/symfony/polyfill" 781 | } 782 | }, 783 | "autoload": { 784 | "psr-4": { 785 | "Symfony\\Polyfill\\Intl\\Idn\\": "" 786 | }, 787 | "files": [ 788 | "bootstrap.php" 789 | ] 790 | }, 791 | "notification-url": "https://packagist.org/downloads/", 792 | "license": [ 793 | "MIT" 794 | ], 795 | "authors": [ 796 | { 797 | "name": "Laurent Bassin", 798 | "email": "laurent@bassin.info" 799 | }, 800 | { 801 | "name": "Trevor Rowbotham", 802 | "email": "trevor.rowbotham@pm.me" 803 | }, 804 | { 805 | "name": "Symfony Community", 806 | "homepage": "https://symfony.com/contributors" 807 | } 808 | ], 809 | "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", 810 | "homepage": "https://symfony.com", 811 | "keywords": [ 812 | "compatibility", 813 | "idn", 814 | "intl", 815 | "polyfill", 816 | "portable", 817 | "shim" 818 | ], 819 | "funding": [ 820 | { 821 | "url": "https://symfony.com/sponsor", 822 | "type": "custom" 823 | }, 824 | { 825 | "url": "https://github.com/fabpot", 826 | "type": "github" 827 | }, 828 | { 829 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 830 | "type": "tidelift" 831 | } 832 | ], 833 | "time": "2020-08-04T06:02:08+00:00" 834 | }, 835 | { 836 | "name": "symfony/polyfill-intl-normalizer", 837 | "version": "v1.18.1", 838 | "source": { 839 | "type": "git", 840 | "url": "https://github.com/symfony/polyfill-intl-normalizer.git", 841 | "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" 842 | }, 843 | "dist": { 844 | "type": "zip", 845 | "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", 846 | "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", 847 | "shasum": "" 848 | }, 849 | "require": { 850 | "php": ">=5.3.3" 851 | }, 852 | "suggest": { 853 | "ext-intl": "For best performance" 854 | }, 855 | "type": "library", 856 | "extra": { 857 | "branch-alias": { 858 | "dev-master": "1.18-dev" 859 | }, 860 | "thanks": { 861 | "name": "symfony/polyfill", 862 | "url": "https://github.com/symfony/polyfill" 863 | } 864 | }, 865 | "autoload": { 866 | "psr-4": { 867 | "Symfony\\Polyfill\\Intl\\Normalizer\\": "" 868 | }, 869 | "files": [ 870 | "bootstrap.php" 871 | ], 872 | "classmap": [ 873 | "Resources/stubs" 874 | ] 875 | }, 876 | "notification-url": "https://packagist.org/downloads/", 877 | "license": [ 878 | "MIT" 879 | ], 880 | "authors": [ 881 | { 882 | "name": "Nicolas Grekas", 883 | "email": "p@tchwork.com" 884 | }, 885 | { 886 | "name": "Symfony Community", 887 | "homepage": "https://symfony.com/contributors" 888 | } 889 | ], 890 | "description": "Symfony polyfill for intl's Normalizer class and related functions", 891 | "homepage": "https://symfony.com", 892 | "keywords": [ 893 | "compatibility", 894 | "intl", 895 | "normalizer", 896 | "polyfill", 897 | "portable", 898 | "shim" 899 | ], 900 | "funding": [ 901 | { 902 | "url": "https://symfony.com/sponsor", 903 | "type": "custom" 904 | }, 905 | { 906 | "url": "https://github.com/fabpot", 907 | "type": "github" 908 | }, 909 | { 910 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 911 | "type": "tidelift" 912 | } 913 | ], 914 | "time": "2020-07-14T12:35:20+00:00" 915 | }, 916 | { 917 | "name": "symfony/polyfill-mbstring", 918 | "version": "v1.18.1", 919 | "source": { 920 | "type": "git", 921 | "url": "https://github.com/symfony/polyfill-mbstring.git", 922 | "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" 923 | }, 924 | "dist": { 925 | "type": "zip", 926 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", 927 | "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", 928 | "shasum": "" 929 | }, 930 | "require": { 931 | "php": ">=5.3.3" 932 | }, 933 | "suggest": { 934 | "ext-mbstring": "For best performance" 935 | }, 936 | "type": "library", 937 | "extra": { 938 | "branch-alias": { 939 | "dev-master": "1.18-dev" 940 | }, 941 | "thanks": { 942 | "name": "symfony/polyfill", 943 | "url": "https://github.com/symfony/polyfill" 944 | } 945 | }, 946 | "autoload": { 947 | "psr-4": { 948 | "Symfony\\Polyfill\\Mbstring\\": "" 949 | }, 950 | "files": [ 951 | "bootstrap.php" 952 | ] 953 | }, 954 | "notification-url": "https://packagist.org/downloads/", 955 | "license": [ 956 | "MIT" 957 | ], 958 | "authors": [ 959 | { 960 | "name": "Nicolas Grekas", 961 | "email": "p@tchwork.com" 962 | }, 963 | { 964 | "name": "Symfony Community", 965 | "homepage": "https://symfony.com/contributors" 966 | } 967 | ], 968 | "description": "Symfony polyfill for the Mbstring extension", 969 | "homepage": "https://symfony.com", 970 | "keywords": [ 971 | "compatibility", 972 | "mbstring", 973 | "polyfill", 974 | "portable", 975 | "shim" 976 | ], 977 | "funding": [ 978 | { 979 | "url": "https://symfony.com/sponsor", 980 | "type": "custom" 981 | }, 982 | { 983 | "url": "https://github.com/fabpot", 984 | "type": "github" 985 | }, 986 | { 987 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 988 | "type": "tidelift" 989 | } 990 | ], 991 | "time": "2020-07-14T12:35:20+00:00" 992 | }, 993 | { 994 | "name": "symfony/polyfill-php70", 995 | "version": "v1.18.1", 996 | "source": { 997 | "type": "git", 998 | "url": "https://github.com/symfony/polyfill-php70.git", 999 | "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" 1000 | }, 1001 | "dist": { 1002 | "type": "zip", 1003 | "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", 1004 | "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", 1005 | "shasum": "" 1006 | }, 1007 | "require": { 1008 | "paragonie/random_compat": "~1.0|~2.0|~9.99", 1009 | "php": ">=5.3.3" 1010 | }, 1011 | "type": "library", 1012 | "extra": { 1013 | "branch-alias": { 1014 | "dev-master": "1.18-dev" 1015 | }, 1016 | "thanks": { 1017 | "name": "symfony/polyfill", 1018 | "url": "https://github.com/symfony/polyfill" 1019 | } 1020 | }, 1021 | "autoload": { 1022 | "psr-4": { 1023 | "Symfony\\Polyfill\\Php70\\": "" 1024 | }, 1025 | "files": [ 1026 | "bootstrap.php" 1027 | ], 1028 | "classmap": [ 1029 | "Resources/stubs" 1030 | ] 1031 | }, 1032 | "notification-url": "https://packagist.org/downloads/", 1033 | "license": [ 1034 | "MIT" 1035 | ], 1036 | "authors": [ 1037 | { 1038 | "name": "Nicolas Grekas", 1039 | "email": "p@tchwork.com" 1040 | }, 1041 | { 1042 | "name": "Symfony Community", 1043 | "homepage": "https://symfony.com/contributors" 1044 | } 1045 | ], 1046 | "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", 1047 | "homepage": "https://symfony.com", 1048 | "keywords": [ 1049 | "compatibility", 1050 | "polyfill", 1051 | "portable", 1052 | "shim" 1053 | ], 1054 | "funding": [ 1055 | { 1056 | "url": "https://symfony.com/sponsor", 1057 | "type": "custom" 1058 | }, 1059 | { 1060 | "url": "https://github.com/fabpot", 1061 | "type": "github" 1062 | }, 1063 | { 1064 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1065 | "type": "tidelift" 1066 | } 1067 | ], 1068 | "time": "2020-07-14T12:35:20+00:00" 1069 | }, 1070 | { 1071 | "name": "symfony/polyfill-php72", 1072 | "version": "v1.18.1", 1073 | "source": { 1074 | "type": "git", 1075 | "url": "https://github.com/symfony/polyfill-php72.git", 1076 | "reference": "639447d008615574653fb3bc60d1986d7172eaae" 1077 | }, 1078 | "dist": { 1079 | "type": "zip", 1080 | "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", 1081 | "reference": "639447d008615574653fb3bc60d1986d7172eaae", 1082 | "shasum": "" 1083 | }, 1084 | "require": { 1085 | "php": ">=5.3.3" 1086 | }, 1087 | "type": "library", 1088 | "extra": { 1089 | "branch-alias": { 1090 | "dev-master": "1.18-dev" 1091 | }, 1092 | "thanks": { 1093 | "name": "symfony/polyfill", 1094 | "url": "https://github.com/symfony/polyfill" 1095 | } 1096 | }, 1097 | "autoload": { 1098 | "psr-4": { 1099 | "Symfony\\Polyfill\\Php72\\": "" 1100 | }, 1101 | "files": [ 1102 | "bootstrap.php" 1103 | ] 1104 | }, 1105 | "notification-url": "https://packagist.org/downloads/", 1106 | "license": [ 1107 | "MIT" 1108 | ], 1109 | "authors": [ 1110 | { 1111 | "name": "Nicolas Grekas", 1112 | "email": "p@tchwork.com" 1113 | }, 1114 | { 1115 | "name": "Symfony Community", 1116 | "homepage": "https://symfony.com/contributors" 1117 | } 1118 | ], 1119 | "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", 1120 | "homepage": "https://symfony.com", 1121 | "keywords": [ 1122 | "compatibility", 1123 | "polyfill", 1124 | "portable", 1125 | "shim" 1126 | ], 1127 | "funding": [ 1128 | { 1129 | "url": "https://symfony.com/sponsor", 1130 | "type": "custom" 1131 | }, 1132 | { 1133 | "url": "https://github.com/fabpot", 1134 | "type": "github" 1135 | }, 1136 | { 1137 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1138 | "type": "tidelift" 1139 | } 1140 | ], 1141 | "time": "2020-07-14T12:35:20+00:00" 1142 | }, 1143 | { 1144 | "name": "symfony/polyfill-php80", 1145 | "version": "v1.18.1", 1146 | "source": { 1147 | "type": "git", 1148 | "url": "https://github.com/symfony/polyfill-php80.git", 1149 | "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" 1150 | }, 1151 | "dist": { 1152 | "type": "zip", 1153 | "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", 1154 | "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", 1155 | "shasum": "" 1156 | }, 1157 | "require": { 1158 | "php": ">=7.0.8" 1159 | }, 1160 | "type": "library", 1161 | "extra": { 1162 | "branch-alias": { 1163 | "dev-master": "1.18-dev" 1164 | }, 1165 | "thanks": { 1166 | "name": "symfony/polyfill", 1167 | "url": "https://github.com/symfony/polyfill" 1168 | } 1169 | }, 1170 | "autoload": { 1171 | "psr-4": { 1172 | "Symfony\\Polyfill\\Php80\\": "" 1173 | }, 1174 | "files": [ 1175 | "bootstrap.php" 1176 | ], 1177 | "classmap": [ 1178 | "Resources/stubs" 1179 | ] 1180 | }, 1181 | "notification-url": "https://packagist.org/downloads/", 1182 | "license": [ 1183 | "MIT" 1184 | ], 1185 | "authors": [ 1186 | { 1187 | "name": "Ion Bazan", 1188 | "email": "ion.bazan@gmail.com" 1189 | }, 1190 | { 1191 | "name": "Nicolas Grekas", 1192 | "email": "p@tchwork.com" 1193 | }, 1194 | { 1195 | "name": "Symfony Community", 1196 | "homepage": "https://symfony.com/contributors" 1197 | } 1198 | ], 1199 | "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", 1200 | "homepage": "https://symfony.com", 1201 | "keywords": [ 1202 | "compatibility", 1203 | "polyfill", 1204 | "portable", 1205 | "shim" 1206 | ], 1207 | "funding": [ 1208 | { 1209 | "url": "https://symfony.com/sponsor", 1210 | "type": "custom" 1211 | }, 1212 | { 1213 | "url": "https://github.com/fabpot", 1214 | "type": "github" 1215 | }, 1216 | { 1217 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1218 | "type": "tidelift" 1219 | } 1220 | ], 1221 | "time": "2020-07-14T12:35:20+00:00" 1222 | }, 1223 | { 1224 | "name": "symfony/translation", 1225 | "version": "v5.1.5", 1226 | "source": { 1227 | "type": "git", 1228 | "url": "https://github.com/symfony/translation.git", 1229 | "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413" 1230 | }, 1231 | "dist": { 1232 | "type": "zip", 1233 | "url": "https://api.github.com/repos/symfony/translation/zipball/917b02cdc5f33e0309b8e9d33ee1480b20687413", 1234 | "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413", 1235 | "shasum": "" 1236 | }, 1237 | "require": { 1238 | "php": ">=7.2.5", 1239 | "symfony/polyfill-mbstring": "~1.0", 1240 | "symfony/polyfill-php80": "^1.15", 1241 | "symfony/translation-contracts": "^2" 1242 | }, 1243 | "conflict": { 1244 | "symfony/config": "<4.4", 1245 | "symfony/dependency-injection": "<5.0", 1246 | "symfony/http-kernel": "<5.0", 1247 | "symfony/twig-bundle": "<5.0", 1248 | "symfony/yaml": "<4.4" 1249 | }, 1250 | "provide": { 1251 | "symfony/translation-implementation": "2.0" 1252 | }, 1253 | "require-dev": { 1254 | "psr/log": "~1.0", 1255 | "symfony/config": "^4.4|^5.0", 1256 | "symfony/console": "^4.4|^5.0", 1257 | "symfony/dependency-injection": "^5.0", 1258 | "symfony/finder": "^4.4|^5.0", 1259 | "symfony/http-kernel": "^5.0", 1260 | "symfony/intl": "^4.4|^5.0", 1261 | "symfony/service-contracts": "^1.1.2|^2", 1262 | "symfony/yaml": "^4.4|^5.0" 1263 | }, 1264 | "suggest": { 1265 | "psr/log-implementation": "To use logging capability in translator", 1266 | "symfony/config": "", 1267 | "symfony/yaml": "" 1268 | }, 1269 | "type": "library", 1270 | "extra": { 1271 | "branch-alias": { 1272 | "dev-master": "5.1-dev" 1273 | } 1274 | }, 1275 | "autoload": { 1276 | "psr-4": { 1277 | "Symfony\\Component\\Translation\\": "" 1278 | }, 1279 | "exclude-from-classmap": [ 1280 | "/Tests/" 1281 | ] 1282 | }, 1283 | "notification-url": "https://packagist.org/downloads/", 1284 | "license": [ 1285 | "MIT" 1286 | ], 1287 | "authors": [ 1288 | { 1289 | "name": "Fabien Potencier", 1290 | "email": "fabien@symfony.com" 1291 | }, 1292 | { 1293 | "name": "Symfony Community", 1294 | "homepage": "https://symfony.com/contributors" 1295 | } 1296 | ], 1297 | "description": "Symfony Translation Component", 1298 | "homepage": "https://symfony.com", 1299 | "funding": [ 1300 | { 1301 | "url": "https://symfony.com/sponsor", 1302 | "type": "custom" 1303 | }, 1304 | { 1305 | "url": "https://github.com/fabpot", 1306 | "type": "github" 1307 | }, 1308 | { 1309 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1310 | "type": "tidelift" 1311 | } 1312 | ], 1313 | "time": "2020-08-17T10:01:29+00:00" 1314 | }, 1315 | { 1316 | "name": "symfony/translation-contracts", 1317 | "version": "v2.1.3", 1318 | "source": { 1319 | "type": "git", 1320 | "url": "https://github.com/symfony/translation-contracts.git", 1321 | "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63" 1322 | }, 1323 | "dist": { 1324 | "type": "zip", 1325 | "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63", 1326 | "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63", 1327 | "shasum": "" 1328 | }, 1329 | "require": { 1330 | "php": ">=7.2.5" 1331 | }, 1332 | "suggest": { 1333 | "symfony/translation-implementation": "" 1334 | }, 1335 | "type": "library", 1336 | "extra": { 1337 | "branch-alias": { 1338 | "dev-master": "2.1-dev" 1339 | }, 1340 | "thanks": { 1341 | "name": "symfony/contracts", 1342 | "url": "https://github.com/symfony/contracts" 1343 | } 1344 | }, 1345 | "autoload": { 1346 | "psr-4": { 1347 | "Symfony\\Contracts\\Translation\\": "" 1348 | } 1349 | }, 1350 | "notification-url": "https://packagist.org/downloads/", 1351 | "license": [ 1352 | "MIT" 1353 | ], 1354 | "authors": [ 1355 | { 1356 | "name": "Nicolas Grekas", 1357 | "email": "p@tchwork.com" 1358 | }, 1359 | { 1360 | "name": "Symfony Community", 1361 | "homepage": "https://symfony.com/contributors" 1362 | } 1363 | ], 1364 | "description": "Generic abstractions related to translation", 1365 | "homepage": "https://symfony.com", 1366 | "keywords": [ 1367 | "abstractions", 1368 | "contracts", 1369 | "decoupling", 1370 | "interfaces", 1371 | "interoperability", 1372 | "standards" 1373 | ], 1374 | "funding": [ 1375 | { 1376 | "url": "https://symfony.com/sponsor", 1377 | "type": "custom" 1378 | }, 1379 | { 1380 | "url": "https://github.com/fabpot", 1381 | "type": "github" 1382 | }, 1383 | { 1384 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1385 | "type": "tidelift" 1386 | } 1387 | ], 1388 | "time": "2020-07-06T13:23:11+00:00" 1389 | } 1390 | ], 1391 | "aliases": [], 1392 | "minimum-stability": "stable", 1393 | "stability-flags": [], 1394 | "prefer-stable": false, 1395 | "prefer-lowest": false, 1396 | "platform": { 1397 | "php": ">=7.0" 1398 | }, 1399 | "platform-dev": [], 1400 | "plugin-api-version": "1.1.0" 1401 | } 1402 | -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | 'toastr', 6 | 7 | 'options' => [ 8 | "closeButton" => true, 9 | "debug" => false, 10 | "newestOnTop" => false, 11 | "progressBar" => true, 12 | "positionClass" => "toast-bottom-right", 13 | "preventDuplicates" => false, 14 | "onclick" => null, 15 | "showDuration" => "300", 16 | "hideDuration" => "1000", 17 | "timeOut" => "10000", 18 | "extendedTimeOut" => "1000", 19 | "showEasing" => "swing", 20 | "hideEasing" => "linear", 21 | "showMethod" => "fadeIn", 22 | "hideMethod" => "fadeOut" 23 | ] 24 | 25 | ]; 26 | -------------------------------------------------------------------------------- /helpers/helpers.php: -------------------------------------------------------------------------------- 1 | session = $session; 40 | $this->config = $config; 41 | $this->sessionName = $config->get('toastr.session_name'); 42 | } 43 | 44 | /** 45 | * @param string $message 46 | * @param string $title 47 | * @return $this 48 | */ 49 | public function success($message, $title = null, $options = []) 50 | { 51 | $this->add('success', $message, $title, $options); 52 | 53 | return $this; 54 | } 55 | 56 | /** 57 | * @param string $message 58 | * @param string $title 59 | * @return $this 60 | */ 61 | public function error($message, $title = null, $options = []) 62 | { 63 | $this->add('error', $message, $title, $options); 64 | 65 | return $this; 66 | } 67 | 68 | /** 69 | * @param string $message 70 | * @param string $title 71 | * @return $this 72 | */ 73 | public function warning($message, $title = null, $options = []) 74 | { 75 | $this->add('warning', $message, $title, $options); 76 | 77 | return $this; 78 | } 79 | 80 | /** 81 | * @param string $message 82 | * @param string $title 83 | * @return $this 84 | */ 85 | public function info($message, $title = null, $options = []) 86 | { 87 | $this->add('info', $message, $title, $options); 88 | 89 | return $this; 90 | } 91 | 92 | /** 93 | * @param string $type 94 | * @param string $message 95 | * @param string $title 96 | * @return void 97 | */ 98 | private function add($type, $message, $title, $options) 99 | { 100 | $this->messages[] = [ 101 | 'type' => $type, 102 | 'title' => $title, 103 | 'message' => $message, 104 | 'options' => $options 105 | ]; 106 | 107 | $this->session->flash($this->sessionName, $this->messages); 108 | } 109 | 110 | public function render() 111 | { 112 | if ($this->session->has($this->sessionName)) { 113 | 114 | $toast = $this->session->get($this->sessionName); 115 | 116 | $script = ''; 135 | 136 | $this->messages = []; 137 | 138 | return $script; 139 | } 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /src/ToastrServiceProvider.php: -------------------------------------------------------------------------------- 1 | publishes([ 25 | __DIR__ . '/../config/config.php' => config_path('toastr.php'), 26 | ], 'config'); 27 | } 28 | 29 | /** 30 | * Register the service provider. 31 | * 32 | * @return void 33 | */ 34 | public function register() 35 | { 36 | $this->app->singleton(Toastr::class, function ($app) { 37 | return new Toastr($app['session'], $app['config']); 38 | }); 39 | 40 | $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'toastr'); 41 | } 42 | 43 | /** 44 | * Get the services provided by the provider. 45 | * 46 | * @return array 47 | */ 48 | public function provides() 49 | { 50 | return [Toastr::class]; 51 | } 52 | } -------------------------------------------------------------------------------- /toastr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tjgazel/laravel-toastr/3c1babf649ea6f1b0cdd3ab30126115d727f140c/toastr.png --------------------------------------------------------------------------------