mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Update Company.php
This commit is contained in:
parent
8988a5dfc3
commit
bbb8ecfee4
|
@ -24,6 +24,9 @@ final class Company extends SnipeModel
|
||||||
// Declare the rules for the model validation
|
// Declare the rules for the model validation
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'name' => 'required|min:1|max:255|unique:companies,name',
|
'name' => 'required|min:1|max:255|unique:companies,name',
|
||||||
|
'fax' => 'min:7|max:35|nullable',
|
||||||
|
'phone' => 'min:7|max:35|nullable',
|
||||||
|
'email' => 'email|max:150|nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $presenter = \App\Presenters\CompanyPresenter::class;
|
protected $presenter = \App\Presenters\CompanyPresenter::class;
|
||||||
|
@ -45,7 +48,7 @@ final class Company extends SnipeModel
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $searchableAttributes = ['name', 'phone', 'fax', 'created_at', 'updated_at'];
|
protected $searchableAttributes = ['name', 'phone', 'fax', 'email', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The relations and their attributes that should be included when searching the model.
|
* The relations and their attributes that should be included when searching the model.
|
||||||
|
@ -63,6 +66,7 @@ final class Company extends SnipeModel
|
||||||
'name',
|
'name',
|
||||||
'phone',
|
'phone',
|
||||||
'fax',
|
'fax',
|
||||||
|
'email',
|
||||||
];
|
];
|
||||||
|
|
||||||
private static function isFullMultipleCompanySupportEnabled()
|
private static function isFullMultipleCompanySupportEnabled()
|
||||||
|
|
Loading…
Reference in a new issue