We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eee239 commit e1882eeCopy full SHA for e1882ee
app/Http/Requests/StoreAssetRequest.php
@@ -29,6 +29,7 @@ public function prepareForValidation(): void
29
// Guard against users passing in an array for company_id instead of an integer.
30
// If the company_id is not an integer then we simply use what was
31
// provided to be caught by model level validation later.
32
+ // The use of is_numeric accounts for 1 and '1'.
33
$idForCurrentUser = is_numeric($this->company_id)
34
? Company::getIdForCurrentUser($this->company_id)
35
: $this->company_id;
0 commit comments