Implement node view, cleanup other files.

Still in progress, need to do a lot of controller cleanup first and add
node deletion as well.
This commit is contained in:
Dane Everitt 2017-03-03 17:30:39 -05:00
parent 6c7fff1de0
commit fd9f1a68eb
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
16 changed files with 1335 additions and 149 deletions

View file

@ -27,10 +27,11 @@ namespace Pterodactyl\Models;
use GuzzleHttp\Client;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Nicolaslopezj\Searchable\SearchableTrait;
class Node extends Model
{
use Notifiable;
use Notifiable, SearchableTrait;
/**
* The table associated with the model.
@ -74,6 +75,18 @@ class Node extends Model
'daemonSFTP', 'daemonListen',
];
protected $searchable = [
'columns' => [
'nodes.name' => 10,
'nodes.fqdn' => 8,
'locations.short' => 4,
'locations.long' => 4,
],
'joins' => [
'locations' => ['locations.id', 'nodes.location_id'],
],
];
/**
* Return an instance of the Guzzle client for this specific node.
*