Passing Model Object losing variable value

What seems to be the problem:
I have a Tag model defined as below. The $set variable is used in between requests such that the blade view may know which tags where previously enabled to show them as checked again. The issue which I am facing is with Livewire’s load more. Let’s assume that the set variable is true when first passing the objects to Livewire. Upon pressing load more, the $tags variable in the Livewire Component still exists but the set parameter becomes null. This does not happen with other variables which I set in the Livewire component - other variables persist the value between load more functions.

Steps to Reproduce:

Are you using the latest version of Livewire:
Yes

Do you have any screenshots or code examples:
class Tag extends Model
{
use HasFactory;
public $set; // used to keep track of whether the tag was enabled in the form or not
}

Hey, @lukegalea16

Why you’re making the check for the tag at the DB layer?

You can use the scope instead to make sure if the tag is enabled or not.

For example:

public function scropeIsTagEnabled($builder)
{
   // make your logic depend on your needs
}

and in the livewire component make a check like that:

$model->isEnabled()

If there is something or idea I didn’t understand please let me know or provide some example code you’re already written for more explanation.