File manager - Edit - /home/autoph/public_html/projects/aha-api/app/Models/ServiceRating.php
Back
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use OwenIt\Auditing\Contracts\Auditable; use Illuminate\Database\Eloquent\SoftDeletes; use OwenIt\Auditing\Auditable as AuditableTrait; use Illuminate\Database\Eloquent\Factories\HasFactory; class ServiceRating extends Model implements Auditable { use HasFactory, AuditableTrait; public $timestamps = false; protected $table = "aha_service_ratings"; /** * The attributes that are NOT mass assignable. * */ protected $guarded = [ // 'deleted_at', ]; /** * The attributes that should be cast. * * @var array<string, string> */ protected $casts = [ // 'created_at' => 'datetime', ]; protected $appends = [ 'customer_name', ]; public function getCustomerNameAttribute() { $customer = Customer::where('aha_user_id', $this->aha_user_id)->first(); return $customer ? ucwords(strtolower("{$customer->firstname} {$customer->lastname}")) : null; } public function service() { return $this->hasOne(ServiceBooking::class, 'id', 'servide_id'); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings