belongsTo(User::class); } public function products() { return $this->belongsToMany(Product::class, 'collection_product'); } public function scopePublic($query) { return $query->where('is_public', Status::YES); } }