Fix update media articles
This commit is contained in:
parent
7166d9a097
commit
f657e39a2e
1 changed files with 6 additions and 0 deletions
|
|
@ -55,6 +55,12 @@ class UpdateMediaRequest extends FormRequest
|
|||
unset($rules['langue_id']);
|
||||
}
|
||||
|
||||
// Article.
|
||||
if ($this->sujet_id == 1) {
|
||||
$rules['articles'] = 'present|array|min:0';
|
||||
$rules['articles.*'] = 'array';
|
||||
$rules['articles.*.id'] = 'exists:articles,id';
|
||||
}
|
||||
// Marque.
|
||||
if ($this->sujet_id == 2) {
|
||||
$rules['marques'] = 'present|array|min:0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue