PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.
* Fixed missing oauth tables during setup.
* Custom fields of type "CUSTOM REGEX" are always saved as "ANY"
Fixes#5896
* Updated per PR
Fixed spelling
* Fixed logic error
Moved conditional code from view to controller
Added getFromatType function for dropdown
This was causing the error: Undefined index: App\Models\CustomField (View: /Users/snipe/Sites/snipe-it/snipe-it/resources/views/hardware/index.blade.php)
and pointed to the Eloquent model library method:
```
protected function initializeTraits()
{
foreach (static::$traitInitializers[static::class] as $method) {
$this->{$method}();
}
}
```
Thanks to https://github.com/laravel/framework/issues/25455 for the clue.
* Fixes CustomFieldsetsController::fields() which I think is not used anywhere else and don't think ever worked as you can't call get() on a Collection.
Have tested extensively and doesn't seem to affect anywhere else?
* Adds default value functionality
* Adds built assets
* Fixes assignment to asset_model_id which should have been evaluation and alters route so it sits more in line with existing work
* Updates built assets
* Remove silly docker.env file; fix Dockerfile to preserve Oauth keys (#5377)
* Added department to custom asset export
Updates build assets
* Adds translation support for 'add default values' checkbox label
* More helpful text on how the custom validator works
* Clarified language of custom format, fixed regex example
* Fixed regex example in placeholder
* Added comments to custom fields
* Added regex validation string
* Added valid_regex validator in format requirements
* Removed useles comments
* Fixes#4236 - validate the regex custom validation
* Pave the imports table
* Format error response if file is the wrong type.
* If a custom field doesn't exist, don't insert a blank string into the custom fields table
* CustomField::db_column_name can return the stored name in the db. It's slugified when that value is set initially. This fixes a weird issue where _1 was replaced with _xx
* Refactored AssetsTransformer
Casted all ids to int, escaped all text values,
* Added warranty_expires attribute to Asset model
$asset->warranty_expires contains a Carbon object with the warranty
expiration date. Returns null when either purchase_date or
warranty_months are not set.
* Ignoring php-cs cache files
* Restored asset tests expectations
Work in progress - tests still fail
* API controller refactoring, fixed HTTP status codes in responses
* Restored $request->get - debugging
* Added further checks in ApiAssetsCest::updateAssetWithPatch
* Fixed undefined method
* Fixed initial underscore trimmed by str_slug
* CustomFieldTest now works where intl PHP extension is not installed
If a server doesn't have the intl php extension installed, the custom fields tests failed. Now the tests perform the same check done in the CustomField class.