PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.7.7
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.7.7
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / Modules / PushNotification / FnSubscriptionModel.php

FnSubscriptionModel.php in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.7.7, at Modules/PushNotification/FnSubscriptionModel.php

56 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCommunity\Modules\PushNotification;
4
5 use FluentCommunity\App\Models\Model;
6 use FluentCommunity\App\Models\SpaceUserPivot;
7
8 /**
9 * This is a placeholder model for Push Notification Subscriptions
10 *
11 * Database Model
12 *
13 * @package FluentCommunity\Modules\PushNotification
14 *
15 * @version 2.1.10
16 */
17 class FnSubscriptionModel extends Model
18 {
19 protected $table = 'fn_subscriptions';
20
21 protected $primaryKey = 'id';
22
23 protected $guarded = ['id'];
24
25 protected $fillable = [
26 'user_id',
27 'fcm_token',
28 'browser',
29 'device',
30 'ip_address',
31 'other_info',
32 'user_agent',
33 'platform',
34 'status'
35 ];
36
37 /**
38 * Relationship: User of this subscription
39 */
40 public function user()
41 {
42 return $this->belongsTo('FluentCommunity\App\Models\User', 'user_id');
43 }
44
45 public function space_pivot()
46 {
47 return $this->belongsTo(SpaceUserPivot::class, 'user_id', 'user_id')->withoutGlobalScopes();
48 }
49
50 public function xprofile()
51 {
52 return $this->belongsTo('FluentCommunity\App\Models\XProfile', 'user_id', 'user_id');
53 }
54
55 }
56