Compare commits

..

2 Commits

Author SHA1 Message Date
Jing Li fa67918746 Update 2023-08-06 13:40:41 +08:00
Jing Li 5cb8b5e9cf Fix 2023-08-06 13:32:04 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class RiceShrimpWeeklyPriceUpdateRequest extends FormRequest
'week' => [
'filled',
'int',
Rule::exists(Keywords::class, 'id')->where(function ($query) {
Rule::exists(Keywords::class, 'key')->where(function ($query) {
return $query->where('type_key', 'weeks-per-year');
}),
],

View File

@ -17,7 +17,7 @@ class RiceShrimpWeeklyPrice extends Model
public function weekObj()
{
return $this->belongsTo(Keywords::class, 'week');
return $this->belongsTo(Keywords::class, 'week', 'key');
}
public function createdBy()