New direction; removed wireguard, readme update
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\NetworkType;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -13,19 +12,12 @@ class Network extends Model
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'type' => NetworkType::class,
|
||||
];
|
||||
return [];
|
||||
}
|
||||
|
||||
public function internalServers(): HasMany
|
||||
public function servers(): HasMany
|
||||
{
|
||||
return $this->hasMany(Server::class, 'internal_network_id');
|
||||
}
|
||||
|
||||
public function externalServers(): HasMany
|
||||
{
|
||||
return $this->hasMany(Server::class, 'external_network_id');
|
||||
return $this->hasMany(Server::class, 'network_id');
|
||||
}
|
||||
|
||||
public function organisation(): BelongsTo
|
||||
|
||||
Reference in New Issue
Block a user