belongsTo('App\Models\User'); } public function getSupportById($supportId) { return self::where(['support_id'=>$supportId])->get(); } public function updateSupportReply($inputData) { return self::where([['sender_id', '!=',$inputData['sender_id']],'support_id'=> $inputData['support_id'], 'is_read' => 0])->update(['is_read' => 1]); } }