Thats enough re-theming for the day...

This commit is contained in:
Dane Everitt 2017-02-18 19:31:44 -05:00
parent 911434d033
commit b926d432e8
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 733 additions and 38 deletions

View file

@ -29,11 +29,12 @@ use Cache;
use Javascript;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Nicolaslopezj\Searchable\SearchableTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
class Server extends Model
{
use Notifiable, SoftDeletes;
use Notifiable, SearchableTrait, SoftDeletes;
/**
* The table associated with the model.
@ -85,6 +86,22 @@ class Server extends Model
'installed' => 'integer',
];
protected $searchable = [
'columns' => [
'servers.name' => 10,
'servers.username' => 10,
'servers.uuidShort' => 9,
'servers.uuid' => 8,
'users.email' => 6,
'users.username' => 6,
'nodes.name' => 2,
],
'joins' => [
'users' => ['users.id', 'servers.owner_id'],
'nodes' => ['nodes.id', 'servers.node_id'],
],
];
/**
* Returns a single server specified by UUID.
* DO NOT USE THIS TO MODIFY SERVER DETAILS OR SAVE THOSE DETAILS.