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

Flash component doesn't display flash message from a controller #22

Open
andreich1980 opened this issue Jul 20, 2017 · 0 comments
Open

Comments

@andreich1980
Copy link

Let's say I create a thread.

Method ThreadsController@store puts message in a session
'flash', 'Your thread has been published!'

In the main layout we have code

<flash message="{{ session('flash') }}"></flash>

In the Flash component there's a created method that checks if message is presented then calls flash method with the message it has got.

flash(data) {
    this.body = data.message;
     this.level = data.level;
      //...
},

But flash method accepts only one argument and assumes that it's an object with message and level properties.

I think it's time to add level prop to the Flash component and change created method that it would call flash with an object it expects.

I could make a PR if I'm right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant