Added a clarifying comment
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f46ecf8ec0
commit
bb42109c0c
1 changed files with 4 additions and 1 deletions
|
@ -27,6 +27,9 @@ class AssetRequest extends Request
|
||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
|
// Below, asset_tag is duplicated here and in the model, largely because
|
||||||
|
// the functional tests will fail because of the way Form Requests work in
|
||||||
|
// Laravel.
|
||||||
$rules = [
|
$rules = [
|
||||||
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
||||||
'name' => 'max:255|nullable',
|
'name' => 'max:255|nullable',
|
||||||
|
@ -46,7 +49,7 @@ class AssetRequest extends Request
|
||||||
];
|
];
|
||||||
|
|
||||||
$settings = \App\Models\Setting::getSettings();
|
$settings = \App\Models\Setting::getSettings();
|
||||||
|
|
||||||
if ($this->request->get('model_id') != '') {
|
if ($this->request->get('model_id') != '') {
|
||||||
$model = AssetModel::find($this->request->get('model_id'));
|
$model = AssetModel::find($this->request->get('model_id'));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue