<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PeoplesChoice extends Model
{
  protected $table = 'peoples_choice';
  protected $fillable = [
  'vehicle',
  'pc_count',
  'created_at',
  'updated_at'
  ];

  protected function casts(): array
  {
      return [
          'created_at' => 'datetime',
          'updated_at' => 'datetime',
      ];
  }

  public function vehicles()
  {
      return $this->belongsTo(Vehicles::class, 'vehicle', 'id');
  }
}
