scores relations
This commit is contained in:
parent
78c72d1937
commit
484e2c23ec
@ -36,7 +36,7 @@ class VehicleScoresResource extends Resource
|
|||||||
->searchable(),
|
->searchable(),
|
||||||
Select::make('vehicle')
|
Select::make('vehicle')
|
||||||
->label('Vehicle')
|
->label('Vehicle')
|
||||||
->options(Vehicles::all()->pluck('owner', 'id'))
|
->options(Vehicles::all()->pluck('owner', 'owner'))
|
||||||
->searchable(),
|
->searchable(),
|
||||||
TextInput::make('overall_score')
|
TextInput::make('overall_score')
|
||||||
->label('Overall Score'),
|
->label('Overall Score'),
|
||||||
|
@ -22,11 +22,11 @@ class VehicleScores extends Model
|
|||||||
|
|
||||||
public function judge()
|
public function judge()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Judges::class, 'judge');
|
return $this->belongsTo(Judges::class, 'judge', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scoredVehicle()
|
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