2017 © Pedro Peláez
 

library flash-me

Simple flash alert for Laravel

image

ken/flash-me

Simple flash alert for Laravel

  • Saturday, October 21, 2017
  • by kenhyuwa
  • Repository
  • 1 Watchers
  • 1 Stars
  • 163 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 26 % Grown

The README.md

Simple Flash Alert for Laravel

FlashMe Flash Alert for Laravel, Elegant, responsive, flexible and lightweight notification plugin with no dependencies, simple and easy to use, (*1)

Getting Started

How to use this packages, (*2)

Installing

composer require ken/flash-me

and, (*3)

php artisan vendor:publish --tag="flashMe"

Optional Setting

config/flash_me.php, (*4)

/**
 * Change this /path if you load assets from local
 * example 'css' => asset('/css/app.css'),
 */
return [
    'css' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/css/iziToast.min.css',
    'js' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/js/iziToast.min.js',
];

resources/lang/en/flash_me.php, (*5)

return [
    'success' => [
        'type' => 'success',
        'title' => 'Hi...',
        'message' => 'FlashMe is Ready!',
        'options' => [
            'position' => 'topRight', // this is an example option, you can add another option
            'transitionIn' => 'bounceInLeft',
                'transitionOut' => 'fadeOut',
        ],
    ],
    'info' => [
        'type' => 'info',
        'title' => 'Hi...',
        'message' => 'FlashMe is Ready!',
        'options' => [
            'position' => 'topRight', // this is an example option, you can add another option
            'transitionIn' => 'bounceInLeft',
                'transitionOut' => 'fadeOut',
        ],
    ],
    'warning' => [
        'type' => 'warning',
        'title' => 'Hi...',
        'message' => 'FlashMe is Ready!',
        'options' => [
            'position' => 'topRight', // this is an example option, you can add another option
            'transitionIn' => 'bounceInLeft',
                'transitionOut' => 'fadeOut',
        ],
    ],
    'error' => [
        'type' => 'error',
        'title' => 'Hi...',
        'message' => 'FlashMe is Ready!',
        'options' => [
            'position' => 'topRight', // this is an example option, you can add another option
            'transitionIn' => 'bounceInLeft',
                'transitionOut' => 'fadeOut',
        ],
    ],
];

other options can use, (*6)

    id: null, 
    class: '',
    title: '',
    titleColor: '',
    titleSize: '',
    titleLineHeight: '',
    message: '',
    messageColor: '',
    messageSize: '',
    messageLineHeight: '',
    backgroundColor: '',
    theme: 'light', // dark
    color: '', // blue, red, green, yellow
    icon: '',
    iconText: '',
    iconColor: '',
    image: '',
    imageWidth: 50,
    maxWidth: null,
    zindex: null,
    layout: 1,
    balloon: false,
    close: true,
    closeOnEscape: false,
    rtl: false,
    position: 'bottomRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
    target: '',
    targetFirst: true,
    toastOnce: false,
    timeout: 5000,
    animateInside: true,
    drag: true,
    pauseOnHover: true,
    resetOnHover: false,
    progressBar: true,
    progressBarColor: '',
    progressBarEasing: 'linear',
    overlay: false,
    overlayClose: false,
    overlayColor: 'rgba(0, 0, 0, 0.6)',
    transitionIn: 'fadeInUp',
    transitionOut: 'fadeOut',
    transitionInMobile: 'fadeInUp',
    transitionOutMobile: 'fadeOutDown',

Usage

How to use if you will send flash alert to view? example if this is controller on your project, (*7)


public function testFlash() { flashMe()->success(); return view('your_view'); }

Another function

flashMe()->success();
flashMe()->info();
flashMe()->warning();
flashMe()->error();

Display

you can display on your master template or single blade, before end of body tag, (*8)

@if (flashMe()->ok())
  {!! flashMe_flash() !!}
@endif

Built With

Demo

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us., (*9)

License

This project is licensed under the MIT License - see the LICENSE.md file for details, (*10)

The Versions

21/10 2017

dev-master

9999999-dev

Simple flash alert for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by wahyu8

21/10 2017

0.0.4

0.0.4.0

Simple flash alert for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by wahyu8

21/10 2017

0.0.3

0.0.3.0

Simple flash alert for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by wahyu8

21/10 2017

0.0.2

0.0.2.0

Simple flash alert for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by wahyu8

21/10 2017

0.0.1

0.0.1.0

Simple flash alert for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by wahyu8