2017 © Pedro Peláez
 

library advice

Chearaan Tool

image

chearaan/advice

Chearaan Tool

  • Thursday, December 10, 2015
  • by chearaan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

advice

Chearaan Tools, (*1)

Using Composer composer require chearaan/advice, (*2)

Add the service provider to config/app.php, (*3)

Chearaan\Advice\AdviceServiceProvider::class, Optionally include the Facade in config/app.php if you'd like., (*4)

Advice => Chearaan\Advice\Facades\Advice::class, Note, there is a advice() function available, so unless you really want to use the Facade, there's no need to include it., (*5)

Usage, (*6)

Basic, (*7)

From your application, call the flash method with a message and type. advice()->flash('Welcome back!', 'success');, (*8)

Within a view, you can now check if a flash message exists and output it., (*9)

@if (advice()->ready()), (*10)

{{ advice()->message() }}

@endif, (*11)

Notify is front-end framework agnostic, so you're free to easily implement the output however you choose. Options You can pass additional options to the flash method, which are then easily accessible within your view. advice()->flash('Welcome back!', 'success', [ 'timer' => 3000, 'text' => 'It\'s really great to see you again', ]); Then, in your view. @if (advice()->ready()), (*12)

@endif, (*13)

The above example uses SweetAlert, but the flexibily of Advice means you can easily use it with any JavaScript alert solution. Issues and contribution Just submit an issue or pull request through GitHub. Thanks!, (*14)

The Versions

10/12 2015

dev-master

9999999-dev

Chearaan Tool

  Sources   Download

MIT

The Requires

 

by S Chandrasegarran