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

[5.3] Add isRead and unread method to DatabaseNotification #17243

Merged
merged 4 commits into from
Jan 10, 2017

Conversation

JellyBool
Copy link
Contributor

@JellyBool JellyBool commented Jan 10, 2017

I found it very useful when display all notifications with view using:

@foreach ($user->notifications as $notification) 
    <div class="notification {{ $notification->isRead ? 'read' : ' ' }}">
       //
    </div>
@endforeach

*
* @return bool
*/
public function isNotRead()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just notRead feels better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will change that.

@JellyBool
Copy link
Contributor Author

Changed isNotRead to notRead @GrahamCampbell

@JellyBool JellyBool changed the title [5.3] Add isRead and isNotRead method to DatabaseNotification [5.3] Add isRead and notRead method to DatabaseNotification Jan 10, 2017
@taylorotwell
Copy link
Member

Isn't it more common to say "unread"?

@JellyBool JellyBool changed the title [5.3] Add isRead and notRead method to DatabaseNotification [5.3] Add isRead and unread method to DatabaseNotification Jan 10, 2017
@taylorotwell taylorotwell merged commit e480e17 into laravel:5.3 Jan 10, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants