updates to add show judging
This commit is contained in:
28
app/Models/CarShowCategory.php
Normal file
28
app/Models/CarShowCategory.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CarShowCategory extends Model
|
||||
{
|
||||
protected $table = 'car_show_categories';
|
||||
protected $fillable = [
|
||||
'category_name',
|
||||
'vehicle_type'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'created_at',
|
||||
'updated_at'
|
||||
];
|
||||
|
||||
public function vehicle()
|
||||
{
|
||||
return $this->hasMany('App\Models\Vehicles', 'id', 'type');
|
||||
}
|
||||
public function showWinner()
|
||||
{
|
||||
return $this->hasMany('App\Models\CarShowWinner', 'id', 'category');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user