Compare commits

..

2 Commits

Author SHA1 Message Date
Jing Li 0e6c40b8f9 Update 2023-08-06 13:50:29 +08:00
Jing Li 1f4ea58abe Fix 2023-08-06 13:50:29 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class RiceShrimpWeeklyPriceUpdateRequest extends FormRequest
'week' => [ 'week' => [
'filled', 'filled',
'int', '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'); return $query->where('type_key', 'weeks-per-year');
}), }),
], ],

View File

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