removes unncessary files
This commit is contained in:
parent
0cca45d858
commit
1001b52c4f
1 changed files with 14 additions and 21 deletions
|
@ -73,18 +73,11 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
'location_id' => 'integer',
|
'location_id' => 'integer',
|
||||||
'company_id' => 'integer',
|
'company_id' => 'integer',
|
||||||
'vip' => 'boolean',
|
'vip' => 'boolean',
|
||||||
|
'created_at' => 'datetime',
|
||||||
|
'updated_at' => 'datetime',
|
||||||
|
'deleted_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
protected $dates = [
|
|
||||||
'created_at',
|
|
||||||
'updated_at',
|
|
||||||
'deleted_at',
|
|
||||||
'start_date' => 'date_format:Y-m-d',
|
|
||||||
'end_date' => 'date_format:Y-m-d',
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model validation rules
|
* Model validation rules
|
||||||
*
|
*
|
||||||
|
@ -272,7 +265,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
{
|
{
|
||||||
// At this point the endpoint is the same for everything.
|
// At this point the endpoint is the same for everything.
|
||||||
// In the future this may want to be adapted for individual notifications.
|
// In the future this may want to be adapted for individual notifications.
|
||||||
$this->endpoint = \App\Models\Setting::getSettings()->slack_endpoint;
|
$this->endpoint = \App\Models\Setting::getSettings()->webhook_endpoint;
|
||||||
|
|
||||||
return $this->endpoint;
|
return $this->endpoint;
|
||||||
}
|
}
|
||||||
|
@ -358,7 +351,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
$totalCount = $assetsCount + $licensesCount + $accessoriesCount + $consumablesCount;
|
$totalCount = $assetsCount + $licensesCount + $accessoriesCount + $consumablesCount;
|
||||||
|
|
||||||
return (int) $totalCount;
|
return (int) $totalCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes the user -> actionlogs relationship
|
* Establishes the user -> actionlogs relationship
|
||||||
|
@ -560,7 +553,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
$username = str_slug($first_name).str_slug($last_name);
|
$username = str_slug($first_name).str_slug($last_name);
|
||||||
} elseif ($format == 'firstnamelastinitial') {
|
} elseif ($format == 'firstnamelastinitial') {
|
||||||
$username = str_slug(($first_name.substr($last_name, 0, 1)));
|
$username = str_slug(($first_name.substr($last_name, 0, 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$user['first_name'] = $first_name;
|
$user['first_name'] = $first_name;
|
||||||
|
@ -657,9 +650,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
*/
|
*/
|
||||||
public function scopeSimpleNameSearch($query, $search)
|
public function scopeSimpleNameSearch($query, $search)
|
||||||
{
|
{
|
||||||
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
|
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
|
||||||
->orWhere('last_name', 'LIKE', '%'.$search.'%')
|
->orWhere('last_name', 'LIKE', '%'.$search.'%')
|
||||||
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$search}%"]);
|
->orWhereRaw('CONCAT('.DB::getTablePrefix().'users.first_name," ",'.DB::getTablePrefix().'users.last_name) LIKE ?', ["%{$search}%"]);
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue