Skip to content

Commit

Permalink
Update Company.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Azelis authored Aug 13, 2023
1 parent 8988a5d commit bbb8ecf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Models/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -63,6 +66,7 @@ final class Company extends SnipeModel
'name',
'phone',
'fax',
'email',
];

private static function isFullMultipleCompanySupportEnabled()
Expand Down

0 comments on commit bbb8ecf

Please sign in to comment.