scores relations
This commit is contained in:
parent
78c72d1937
commit
484e2c23ec
@ -36,7 +36,7 @@ class VehicleScoresResource extends Resource
|
||||
->searchable(),
|
||||
Select::make('vehicle')
|
||||
->label('Vehicle')
|
||||
->options(Vehicles::all()->pluck('owner', 'id'))
|
||||
->options(Vehicles::all()->pluck('owner', 'owner'))
|
||||
->searchable(),
|
||||
TextInput::make('overall_score')
|
||||
->label('Overall Score'),
|
||||
|
@ -22,11 +22,11 @@ class VehicleScores extends Model
|
||||
|
||||
public function judge()
|
||||
{
|
||||
return $this->belongsTo(Judges::class, 'judge');
|
||||
return $this->belongsTo(Judges::class, 'judge', 'id');
|
||||
}
|
||||
|
||||
public function scoredVehicle()
|
||||
{
|
||||
return $this->hasMany(Vehicles::class, 'owner');
|
||||
return $this->hasMany('App\Models\Vehicles', 'owner', 'vehicle');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user