31 lines
484 B
PHP
31 lines
484 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'
|
|
];
|
|
|
|
protected $dates = [
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
public function awardVehicle()
|
|
{
|
|
return $this->hasMany(Vehicles::class, 'owner');
|
|
}
|
|
|
|
public function awardCategory()
|
|
{
|
|
return $this->hasMany(CarShowCategory::class, 'category_name');
|
|
}
|
|
}
|