Changeset View
Changeset View
Standalone View
Standalone View
src/app/OpenVidu/RoomSetting.php
Show All 15 Lines | |||||
{ | { | ||||
protected $fillable = [ | protected $fillable = [ | ||||
'room_id', 'key', 'value' | 'room_id', 'key', 'value' | ||||
]; | ]; | ||||
protected $table = 'openvidu_room_settings'; | protected $table = 'openvidu_room_settings'; | ||||
/** | /** | ||||
* The user to which this setting belongs. | * The room to which this setting belongs. | ||||
* | * | ||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||
*/ | */ | ||||
public function room() | public function room() | ||||
{ | { | ||||
return $this->belongsTo( | return $this->belongsTo('\App\OpenVidu\Room', 'room_id', 'id'); | ||||
'\App\OpenVidu\Room', | |||||
'room_id', /* local */ | |||||
'id' /* remote */ | |||||
); | |||||
} | } | ||||
} | } |