改进
This commit is contained in:
parent
abfc202311
commit
4200b36efc
@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Tunnel extends Model
|
||||
{
|
||||
@ -19,7 +20,11 @@ class Tunnel extends Model
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function server()
|
||||
protected $with = [
|
||||
'server',
|
||||
];
|
||||
|
||||
public function server(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Server::class);
|
||||
|
||||
|
@ -25,17 +25,22 @@
|
||||
</router-link>
|
||||
|
||||
</td>
|
||||
<td>STCP</td>
|
||||
<td>127.0.0.1:80</td>
|
||||
<td>
|
||||
{{ tunnel.protocol.toString().toUpperCase() }}
|
||||
</td>
|
||||
<td>
|
||||
{{ tunnel.local_address }}
|
||||
</td>
|
||||
|
||||
<td>127.0.01:</td>
|
||||
<td>
|
||||
{{ tunnel.server.server_address }}{{ tunnel.remote_port }}
|
||||
</td>
|
||||
|
||||
<td>0</td>
|
||||
<td>0.000 Bytes</td>
|
||||
<td>0.000 Bytes</td>
|
||||
|
||||
<td><a href=" http:
|
||||
//portio.test/servers/1">Test</a></td>
|
||||
<td>Test</td>
|
||||
|
||||
<td>
|
||||
<span class="text-danger">离线</span>
|
||||
|
@ -0,0 +1,4 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user