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