return $this->belongsTo(User::class);
}
+ public function getName() {
+ if (!empty($this->name_override)) {
+ return $this->name_override;
+ }
+ if ($this->user) {
+ if (!empty($this->user->nickname)) {
+ return $this->user->nickname;
+ }
+ if (!empty($this->user->username)) {
+ return $this->user->username;
+ }
+ }
+ return '';
+ }
+
+ public function getStreamLink() {
+ if (!empty($this->stream_override)) {
+ return $this->stream_override;
+ }
+ if ($this->user && !empty($this->user->stream_link)) {
+ return $this->user->stream_link;
+ }
+ return '';
+ }
+
protected $casts = [
'confirmed' => 'boolean',
+ 'user_id' => 'string',
+ ];
+
+ protected $fillable = [
+ 'channel_id',
+ 'episode_id',
+ 'role',
+ 'user_id',
];
protected $hidden = [