Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload - files dev #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013 Kamal Nasser <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2013 Kamal Nasser <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
138 changes: 69 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
Laravel Notify
======

Elegant notifications to laravel with [Toastr](https://github.com/CodeSeven/toastr) or [PNotify](https://github.com/sciactive/pnotify)

Installation
------------

1. Either run `composer require helmesvs/laravel-notify` or add `"helmesvs/laravel-notify"` to the `require` key in `composer.json` and run `composer install`.
2. Add `Helmesvs\Notify\NotifyServiceProvider::class,` to the `providers` key in `config/app.php`.
3. Add `'Notify' => Helmesvs\Notify\Facades\Notify::class,` to the `aliases` key in `config/app.php`.
4. Run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to publish the config file.
5. Include the output `{!! Notify::render() !!}` in your master view template.
6. *Optional*: Modify the configuration file located in config/notify.php.

Usage
-----

Call one of these methods in your controllers to insert a notification:
- `Notify::warning($message, $title = null, $options = [])` - add a warning notification
- `Notify::error($message, $title = null, $options = [])` - add an error notification
- `Notify::info($message, $title = null, $options = [])` - add an info notification
- `Notify::success($message, $title = null, $options = [])` - add a success notification
- `Notify::add($type: warning|error|info|success, $message, $title = null, $options = [])` - add a notification
- **`Notify::clear()` - clear all current notification**

Configuration
-------------

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.


### General Options
``` php
'options' => [
'lib' => 'toastr',
'style' => 'custom'
]
```

Set `'lib'` as `toastr` to use [toastr.js](https://github.com/CodeSeven/toastr) or `pnotify` to use [pnotify.js](https://github.com/sciactive/pnotify).

Set `'style'` to `'custom'` to use custom settings, or as `'default'` to default library settings.

The style of notifications can be customized in `public/vendor/Notify/style.css`.

### Options Toastr
``` php
'ToastrOptions' => [
"closeButton" => false,
"closeHtml" => '',
"newestOnTop" => true,
"progressBar" => false,
...
]
```

### Options PNotify
``` php
'PNotifyOptions' => [
'title_escape' => false,
'text_escape' => false,
'styling' => 'brighttheme',
'addclass' => '',
...
]
```

For a list of available options, see [toastr.js' documentation](https://github.com/CodeSeven/toastr) and [pnotify.js' documentation](https://github.com/sciactive/pnotify).
Laravel Notify
======
Elegant notifications to laravel with [Toastr](https://github.com/CodeSeven/toastr) or [PNotify](https://github.com/sciactive/pnotify)
Installation
------------
1. Either run `composer require helmesvs/laravel-notify` or add `"helmesvs/laravel-notify"` to the `require` key in `composer.json` and run `composer install`.
2. Add `Helmesvs\Notify\NotifyServiceProvider::class,` to the `providers` key in `config/app.php`.
3. Add `'Notify' => Helmesvs\Notify\Facades\Notify::class,` to the `aliases` key in `config/app.php`.
4. Run `php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify"` to publish the config file.
5. Include the output `{!! Notify::render() !!}` in your master view template.
6. *Optional*: Modify the configuration file located in config/notify.php.
Usage
-----
Call one of these methods in your controllers to insert a notification:
- `Notify::warning($message, $title = null, $options = [])` - add a warning notification
- `Notify::error($message, $title = null, $options = [])` - add an error notification
- `Notify::info($message, $title = null, $options = [])` - add an info notification
- `Notify::success($message, $title = null, $options = [])` - add a success notification
- `Notify::add($type: warning|error|info|success, $message, $title = null, $options = [])` - add a notification
- **`Notify::clear()` - clear all current notification**
Configuration
-------------
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.
### General Options
``` php
'options' => [
'lib' => 'toastr',
'style' => 'custom'
]
```
Set `'lib'` as `toastr` to use [toastr.js](https://github.com/CodeSeven/toastr) or `pnotify` to use [pnotify.js](https://github.com/sciactive/pnotify).
Set `'style'` to `'custom'` to use custom settings, or as `'default'` to default library settings.
The style of notifications can be customized in `public/vendor/Notify/style.css`.
### Options Toastr
``` php
'ToastrOptions' => [
"closeButton" => false,
"closeHtml" => '',
"newestOnTop" => true,
"progressBar" => false,
...
]
```
### Options PNotify
``` php
'PNotifyOptions' => [
'title_escape' => false,
'text_escape' => false,
'styling' => 'brighttheme',
'addclass' => '',
...
]
```
For a list of available options, see [toastr.js' documentation](https://github.com/CodeSeven/toastr) and [pnotify.js' documentation](https://github.com/sciactive/pnotify).
48 changes: 24 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "helmesvs/laravel-notify",
"description": "Elegant notifications to laravel with Toastr or PNotify",
"keywords": ["PNotify", "notify", "toastr", "notification", "laravel", "php"],
"homepage": "https://github.com/Helmesvs/laravel-notify",
"license": "MIT",
"authors": [
{
"name": "Helmes V. Santos",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": ">=5.0.0",
"illuminate/session": ">=5.0.0"
},
"autoload": {
"psr-4": {
"Helmesvs\\Notify\\": "src/"
}
},
"minimum-stability": "dev"
}
{
"name": "helmesvs/laravel-notify",
"description": "Elegant notifications to laravel with Toastr or PNotify",
"keywords": ["PNotify", "notify", "toastr", "notification", "laravel", "php"],
"homepage": "https://github.com/Helmesvs/laravel-notify",
"license": "MIT",
"authors": [
{
"name": "Helmes V. Santos",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": ">=5.0.0",
"illuminate/session": ">=5.0.0"
},
"autoload": {
"psr-4": {
"Helmesvs\\Notify\\": "src/"
}
},
"minimum-stability": "dev"
}
34 changes: 17 additions & 17 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
26 changes: 13 additions & 13 deletions src/Facades/Notify.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php namespace Helmesvs\Notify\Facades;

use Illuminate\Support\Facades\Facade;

class Notify extends Facade {
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor() { return 'notify'; }

}
<?php namespace Helmesvs\Notify\Facades;
use Illuminate\Support\Facades\Facade;
class Notify extends Facade {
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor() { return 'notify'; }
}
Loading