ChristianKuri / laravel-favorite

Allows Laravel Eloquent models to implement a 'favorite', 'like', 'remember' and 'follow' features.
MIT License
226 stars 48 forks source link

Added the ability to filter out subject (favoriting) with null values. #30

Open arungpisyadi opened 3 years ago

arungpisyadi commented 3 years ago

Description

This patch will filter out null items of the subject (the ones that are favoriting) when the items are no longer available through Eloquent collection.

Motivation and context

Why is this change required? What problem does it solve?

If it fixes an open issue, please link to the issue here (if you write fixes #num or closes #num, the issue will be automatically closed when the pull is accepted.)

How has this been tested?

Please describe in detail how you tested your changes.

Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

If you're unsure about any of these, don't hesitate to ask. We're here to help!