inital commit

This commit is contained in:
2026-06-24 18:29:01 +06:00
commit f401802bf7
3918 changed files with 553085 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Support_Reply extends BaseModel
{
use HasFactory;
protected $table = 'support_replies';
protected $fillable = ['support_id','message','sender_id','attachment_path','is_read'];
public function addSupportReply($inputData){
$return_data = self::create($inputData);
return $return_data;
}
public function user()
{
return $this->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]);
}
}