Files
aroginhealthcare/Modules/Service/app/Models/Service.php
2025-08-17 16:23:14 +05:45

38 lines
743 B
PHP

<?php
namespace Modules\Service\app\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Service extends Model
{
use SoftDeletes;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'uuid',
'title',
'summary',
'detail',
'image',
'image_path',
'status',
'slug',
// 'homepage_flag',
];
public function serviceMeta()
{
return $this->hasOne(ServiceMeta::class, 'service_id');
}
public function getFullImageAttribute()
{
return $this->image_path ? asset('storage/uploads/'.$this->image_path) : asset('source/images/default.jpg');
}
}