Files

35 lines
611 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CarShowWinner extends Model
{
protected $table = 'car_show_winners';
protected $fillable = [
'vehicle',
'category',
'place',
'total_score'
];
protected function casts(): array
{
return [
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}
public function awardVehicle()
{
return $this->belongsTo('App\Models\Vehicles', 'vehicle', 'id');
}
public function awardCategory()
{
return $this->belongsTo('App\Models\CarShowCategory', 'category', 'id');
}
}