fix: find package name by name

This commit is contained in:
2025-12-12 18:50:07 +03:30
parent 2e9117cb48
commit e5831b86d2
+4 -1
View File
@@ -27,7 +27,10 @@ public function registerMediaCollections(): void
{ {
$this->addMediaCollection('firebase_json')->singleFile(); $this->addMediaCollection('firebase_json')->singleFile();
} }
public function getRouteKeyName()
{
return 'name';
}
public function users() public function users()
{ {
return $this->belongsToMany(User::class, 'user_package_name')->withPivot(['id', 'tries', 'source', 'fcm_token'])->withTimestamps(); return $this->belongsToMany(User::class, 'user_package_name')->withPivot(['id', 'tries', 'source', 'fcm_token'])->withTimestamps();