File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 55namespace YieldStudio \LaravelExpoNotifier \Traits ;
66
77use Illuminate \Database \Eloquent \Relations \MorphMany ;
8+ use YieldStudio \LaravelExpoNotifier \Models \ExpoNotification ;
89use YieldStudio \LaravelExpoNotifier \Models \ExpoToken ;
910
1011trait HasManyExpoToken
@@ -13,4 +14,9 @@ public function expoTokens(): MorphMany
1314 {
1415 return $ this ->morphMany (ExpoToken::class, 'owner ' );
1516 }
17+
18+ public function expoNotifications (): MorphMany
19+ {
20+ return $ this ->morphMany (ExpoNotification::class, 'receiver ' );
21+ }
1622}
Original file line number Diff line number Diff line change 44
55namespace YieldStudio \LaravelExpoNotifier \Traits ;
66
7+ use Illuminate \Database \Eloquent \Relations \MorphMany ;
78use Illuminate \Database \Eloquent \Relations \MorphOne ;
9+ use YieldStudio \LaravelExpoNotifier \Models \ExpoNotification ;
810use YieldStudio \LaravelExpoNotifier \Models \ExpoToken ;
911
1012trait HasUniqueExpoToken
@@ -13,4 +15,9 @@ public function expoTokens(): MorphOne
1315 {
1416 return $ this ->morphOne (ExpoToken::class, 'owner ' );
1517 }
18+
19+ public function expoNotifications (): MorphMany
20+ {
21+ return $ this ->morphMany (ExpoNotification::class, 'receiver ' );
22+ }
1623}
You can’t perform that action at this time.
0 commit comments