<?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 $dates = [ 'created_at', 'updated_at' ]; public function vehicles() { return $this->belongsTo('App\Models\Vehicles', 'vehicle', 'id'); } }