Merge branch 'staging' of itcorp.primaya.id:ra

This commit is contained in:
2023-08-30 11:09:12 +07:00
156 changed files with 20227 additions and 19255 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Models\OLDLMS;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class DoctorRating extends Model
{
use HasFactory;
const CREATED_AT = 'dCreateOn';
const UPDATED_AT = 'dUpdateOn';
const DELETED_AT = 'dDeleteOn';
protected $connection = 'oldlms';
protected $table = 'tx_dokter_rating';
// Define a belongsTo relationship with the User model
public function user()
{
return $this->belongsTo(User::class, 'nIDUser');
}
// Include additional fields in the model's JSON form
protected $appends = [
'user_first_name', // Include the attribute for user's first name
];
// Define an accessor to get the first name of the related user
public function getUserFirstNameAttribute()
{
return $this->user ? $this->user->sFirstName : null;
}
}