updates to add show judging

This commit is contained in:
2019-07-11 20:55:45 -04:00
parent 7cdea664e1
commit c2aced484d
34 changed files with 2341 additions and 318 deletions

View File

@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class vehicles extends Model
{
protected $table = 'items';
protected $table = 'vehicles';
protected $fillable = [
'year',
'make',
@ -20,4 +20,24 @@ class vehicles extends Model
'created_at',
'updated_at'
];
public function vehicleType()
{
return $this->belongsTo('App\Models\CarShowCategory', 'type', 'id');
}
public function vehicleOwner()
{
return $this->belongsTo('App\Models\Bidders', 'owner', 'bidder_assigned_number');
}
public function vehicleScores()
{
return $this->hasMany('App\Models\VechicleScores', 'id', 'vehicle');
}
public function CarShowWinner()
{
return $this->belongsTo('App\Models\CarShowWinner', 'id', 'vehicle');
}
}