mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -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
|
||||
protected $rules = [
|
||||
'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;
|
||||
|
@ -45,7 +48,7 @@ final class Company extends SnipeModel
|
|||
*
|
||||
* @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.
|
||||
|
@ -63,6 +66,7 @@ final class Company extends SnipeModel
|
|||
'name',
|
||||
'phone',
|
||||
'fax',
|
||||
'email',
|
||||
];
|
||||
|
||||
private static function isFullMultipleCompanySupportEnabled()
|
||||
|
|
Loading…
Reference in a new issue