Skip to content

Commit fd3abc8

Browse files
authored
Add files via upload
1 parent 900dfb9 commit fd3abc8

12 files changed

+1801
-1806
lines changed

LICENSE

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
The MIT License (MIT)
2-
3-
Copyright (c) 2013 Kamal Nasser <[email protected]>
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in
13-
all 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,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Kamal Nasser <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all 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,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+69-69
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
Laravel Notify
2-
======
3-
4-
Elegant notifications to laravel with [Toastr](https://github.com/CodeSeven/toastr) or [PNotify](https://github.com/sciactive/pnotify)
5-
6-
Installation
7-
------------
8-
9-
1. Either run `composer require helmesvs/laravel-notify` or add `"helmesvs/laravel-notify"` to the `require` key in `composer.json` and run `composer install`.
10-
2. Add `Helmesvs\Notify\NotifyServiceProvider::class,` to the `providers` key in `config/app.php`.
11-
3. Add `'Notify' => Helmesvs\Notify\Facades\Notify::class,` to the `aliases` key in `config/app.php`.
12-
4. Run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to publish the config file.
13-
5. Include the output `{!! Notify::render() !!}` in your master view template.
14-
6. *Optional*: Modify the configuration file located in config/notify.php.
15-
16-
Usage
17-
-----
18-
19-
Call one of these methods in your controllers to insert a notification:
20-
- `Notify::warning($message, $title = null, $options = [])` - add a warning notification
21-
- `Notify::error($message, $title = null, $options = [])` - add an error notification
22-
- `Notify::info($message, $title = null, $options = [])` - add an info notification
23-
- `Notify::success($message, $title = null, $options = [])` - add a success notification
24-
- `Notify::add($type: warning|error|info|success, $message, $title = null, $options = [])` - add a notification
25-
- **`Notify::clear()` - clear all current notification**
26-
27-
Configuration
28-
-------------
29-
30-
Open `config/notify.php` to adjust package configuration. If this file doesn't exist, run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to create the default configuration file.
31-
32-
33-
### General Options
34-
``` php
35-
'options' => [
36-
'lib' => 'toastr',
37-
'style' => 'custom'
38-
]
39-
```
40-
41-
Set `'lib'` as `toastr` to use [toastr.js](https://github.com/CodeSeven/toastr) or `pnotify` to use [pnotify.js](https://github.com/sciactive/pnotify).
42-
43-
Set `'style'` to `'custom'` to use custom settings, or as `'default'` to default library settings.
44-
45-
The style of notifications can be customized in `public/vendor/Notify/style.css`.
46-
47-
### Options Toastr
48-
``` php
49-
'ToastrOptions' => [
50-
"closeButton" => false,
51-
"closeHtml" => '',
52-
"newestOnTop" => true,
53-
"progressBar" => false,
54-
...
55-
]
56-
```
57-
58-
### Options PNotify
59-
``` php
60-
'PNotifyOptions' => [
61-
'title_escape' => false,
62-
'text_escape' => false,
63-
'styling' => 'brighttheme',
64-
'addclass' => '',
65-
...
66-
]
67-
```
68-
69-
For a list of available options, see [toastr.js' documentation](https://github.com/CodeSeven/toastr) and [pnotify.js' documentation](https://github.com/sciactive/pnotify).
1+
Laravel Notify
2+
======
3+
4+
Elegant notifications to laravel with [Toastr](https://github.com/CodeSeven/toastr) or [PNotify](https://github.com/sciactive/pnotify)
5+
6+
Installation
7+
------------
8+
9+
1. Either run `composer require helmesvs/laravel-notify` or add `"helmesvs/laravel-notify"` to the `require` key in `composer.json` and run `composer install`.
10+
2. Add `Helmesvs\Notify\NotifyServiceProvider::class,` to the `providers` key in `config/app.php`.
11+
3. Add `'Notify' => Helmesvs\Notify\Facades\Notify::class,` to the `aliases` key in `config/app.php`.
12+
4. Run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to publish the config file.
13+
5. Include the output `{!! Notify::render() !!}` in your master view template.
14+
6. *Optional*: Modify the configuration file located in config/notify.php.
15+
16+
Usage
17+
-----
18+
19+
Call one of these methods in your controllers to insert a notification:
20+
- `Notify::warning($message, $title = null, $options = [])` - add a warning notification
21+
- `Notify::error($message, $title = null, $options = [])` - add an error notification
22+
- `Notify::info($message, $title = null, $options = [])` - add an info notification
23+
- `Notify::success($message, $title = null, $options = [])` - add a success notification
24+
- `Notify::add($type: warning|error|info|success, $message, $title = null, $options = [])` - add a notification
25+
- **`Notify::clear()` - clear all current notification**
26+
27+
Configuration
28+
-------------
29+
30+
Open `config/notify.php` to adjust package configuration. If this file doesn't exist, run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to create the default configuration file.
31+
32+
33+
### General Options
34+
``` php
35+
'options' => [
36+
'lib' => 'toastr',
37+
'style' => 'custom'
38+
]
39+
```
40+
41+
Set `'lib'` as `toastr` to use [toastr.js](https://github.com/CodeSeven/toastr) or `pnotify` to use [pnotify.js](https://github.com/sciactive/pnotify).
42+
43+
Set `'style'` to `'custom'` to use custom settings, or as `'default'` to default library settings.
44+
45+
The style of notifications can be customized in `public/vendor/Notify/style.css`.
46+
47+
### Options Toastr
48+
``` php
49+
'ToastrOptions' => [
50+
"closeButton" => false,
51+
"closeHtml" => '',
52+
"newestOnTop" => true,
53+
"progressBar" => false,
54+
...
55+
]
56+
```
57+
58+
### Options PNotify
59+
``` php
60+
'PNotifyOptions' => [
61+
'title_escape' => false,
62+
'text_escape' => false,
63+
'styling' => 'brighttheme',
64+
'addclass' => '',
65+
...
66+
]
67+
```
68+
69+
For a list of available options, see [toastr.js' documentation](https://github.com/CodeSeven/toastr) and [pnotify.js' documentation](https://github.com/sciactive/pnotify).

composer.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
{
2-
"name": "helmesvs/laravel-notify",
3-
"description": "Elegant notifications to laravel with Toastr or PNotify",
4-
"keywords": ["PNotify", "notify", "toastr", "notification", "laravel", "php"],
5-
"homepage": "https://github.com/Helmesvs/laravel-notify",
6-
"license": "MIT",
7-
"authors": [
8-
{
9-
"name": "Helmes V. Santos",
10-
"email": "[email protected]"
11-
}
12-
],
13-
"require": {
14-
"php": ">=5.4.0",
15-
"illuminate/support": ">=5.0.0",
16-
"illuminate/session": ">=5.0.0"
17-
},
18-
"autoload": {
19-
"psr-4": {
20-
"Helmesvs\\Notify\\": "src/"
21-
}
22-
},
23-
"minimum-stability": "dev"
24-
}
1+
{
2+
"name": "helmesvs/laravel-notify",
3+
"description": "Elegant notifications to laravel with Toastr or PNotify",
4+
"keywords": ["PNotify", "notify", "toastr", "notification", "laravel", "php"],
5+
"homepage": "https://github.com/Helmesvs/laravel-notify",
6+
"license": "MIT",
7+
"authors": [
8+
{
9+
"name": "Helmes V. Santos",
10+
"email": "[email protected]"
11+
}
12+
],
13+
"require": {
14+
"php": ">=5.4.0",
15+
"illuminate/support": ">=5.0.0",
16+
"illuminate/session": ">=5.0.0"
17+
},
18+
"autoload": {
19+
"psr-4": {
20+
"Helmesvs\\Notify\\": "src/"
21+
}
22+
},
23+
"minimum-stability": "dev"
24+
}

phpunit.xml

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
syntaxCheck="false"
12-
>
13-
<testsuites>
14-
<testsuite name="Package Test Suite">
15-
<directory suffix=".php">./tests/</directory>
16-
</testsuite>
17-
</testsuites>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
>
13+
<testsuites>
14+
<testsuite name="Package Test Suite">
15+
<directory suffix=".php">./tests/</directory>
16+
</testsuite>
17+
</testsuites>
1818
</phpunit>

src/Facades/Notify.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?php namespace Helmesvs\Notify\Facades;
2-
3-
use Illuminate\Support\Facades\Facade;
4-
5-
class Notify extends Facade {
6-
/**
7-
* Get the registered name of the component.
8-
*
9-
* @return string
10-
*/
11-
protected static function getFacadeAccessor() { return 'notify'; }
12-
13-
}
1+
<?php namespace Helmesvs\Notify\Facades;
2+
3+
use Illuminate\Support\Facades\Facade;
4+
5+
class Notify extends Facade {
6+
/**
7+
* Get the registered name of the component.
8+
*
9+
* @return string
10+
*/
11+
protected static function getFacadeAccessor() { return 'notify'; }
12+
13+
}

0 commit comments

Comments
 (0)