Complete base implementation of services for administrative server creation
This commit is contained in:
parent
f842aae3d3
commit
8daec38622
22 changed files with 633 additions and 141 deletions
|
@ -75,14 +75,14 @@ class ServerFormRequest extends AdminFormRequest
|
|||
return ! ($input->auto_deploy);
|
||||
});
|
||||
|
||||
if ($this->input('pack_id') !== 0) {
|
||||
$validator->sometimes('pack_id', [
|
||||
Rule::exists('packs', 'id')->where(function ($query) {
|
||||
$query->where('selectable', 1);
|
||||
$query->where('option_id', $this->input('option_id'));
|
||||
}),
|
||||
]);
|
||||
}
|
||||
$validator->sometimes('pack_id', [
|
||||
Rule::exists('packs', 'id')->where(function ($query) {
|
||||
$query->where('selectable', 1);
|
||||
$query->where('option_id', $this->input('option_id'));
|
||||
}),
|
||||
], function ($input) {
|
||||
return $input->pack_id !== 0 && $input->pack_id !== null;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue