This commit is contained in:
iVampireSP.com 2023-03-16 21:44:01 +08:00
parent abfc202311
commit 4200b36efc
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
3 changed files with 20 additions and 6 deletions

View File

@ -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);

View File

@ -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>

View File

@ -0,0 +1,4 @@
<template>
</template>