<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Car extends Model
{
    use HasFactory;
    protected $fillable=['type','model','status'];

    public function getNameAttribute()
    {
        return $this->type.'-'.$this->model;
    }
    
      public function service()
    {
        return $this->hasOne(Service::class);
    }
}
