21 lines
337 B
PHP
21 lines
337 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TopologyPort extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['metadata' => 'array'];
|
|
}
|
|
|
|
public function node()
|
|
{
|
|
return $this->belongsTo(TopologyNode::class, 'node_id');
|
|
}
|
|
}
|