Code Monkey home page Code Monkey logo

laraflash's Introduction

Advanced Blog / CMS Series

PLEASE NOTE: THIS REPO/PROJECT IS NO LONGER MAINTAINED

Due to this project being outdated. I have restarted this project under a different repo. The video series is already being filmed. You will start seeing it available soon on the DevMarketer YouTube Channel.

If you want to follow along you can visit the NEW repo which is at https://github.com/DevMarketer/DevMarketer.io.

laraflash's People

Contributors

jacurtis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laraflash's Issues

Installed Laraflash and getting error.

syntax error, unexpected 'new' (T_NEW), expecting identifier (T_STRING)

(1/1) FatalErrorExceptionsyntax error, unexpected 'new' (T_NEW), expecting identifier (T_STRING)

in LaraFlash.php (line 70)

Fluent Interface for New Notifications

It would be cool to have a fluent interface to allow you to generate new notifications. Once again, like eloquent or something like that.

Example

LaraFlash::new()->title('Error: ')->content('The Database Encountered a Problem!')->type('danger')->priority(10);

Chainable Commands

  1. new() - to generate a new notification
  2. title() - to set the title property
  3. content() - to set the content property
  4. type() - to set the type property
  5. priority() - to set the priority property

Create Notification object for each flash notification

Instead of a collection of strings, I want to enhance this by making it a collection of Notification objects. This will make the project much more flexible and allow us to interact with it similar to Eloquent.

Notification

  • public title - this allows you to add a title to a notification
  • public message - the main content of the notification
  • public type - this would be the type of notification such as error, success, info, or general
  • public priority - this is an arbitrary integer to indicate priority similar to how z-index css property is managed.

LaraFlash Package

Hey bro, how are you??
In the first, congratulations for your awesome job!!
The LadaFlash work in the test on HomeController, but doesn't work in the manage.posts.create.

Is it necessary put DevMarketer\LaraFlash\LaraFlashServiceProvider::class, in 'provider' and
the other in 'aliases'??

but does not work here. Can you help me??

sorry for my english!!

Flashes are not persisting across redirects

When calling the following the code, it does not show the LaraFlash data:

LaraFlash::success('Success message...');
return redirect(route('index'));

Hence, the redirect is clearing the flash.

Create methods to instantiate a Notification with Type

To keep it simple we want to be able to add a method that enables a user to easily set the notification type with a method and the content.

Something like this:

  • LaraFlash::info($content)
  • LaraFlash::danger($content)
  • LaraFlash::warning($content)
  • LaraFlash::success($content)

Additional Methods to Add

There are some more methods I want to add to enhance the LaraFlash this functionality

  1. clear() to clear out all of the notifications from the LaraFlash object
  2. first() to get the first notification
  3. last() to get the last notification
  4. keep() to extend the flash session for another request
  5. override($index) to override the notification at that index with another notification
  6. overrideLast() to override the most recent notification with another notification

Complete Readme

The readme still needs some work. The usage part is empty. Make sure to also add a section related to contributing and about DevMarketer in general and a way to contact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.