Lae/resources/views/admin/hosts/index.blade.php

70 lines
2.2 KiB
PHP
Raw Permalink Normal View History

2022-11-18 10:50:28 +00:00
@extends('layouts.admin')
@section('title', '主机')
@section('content')
2023-02-12 18:28:55 +00:00
<h3>主机管理</h3>
<p>计费项目。</p>
2022-11-18 10:50:28 +00:00
<div class="overflow-auto">
<table class="table table-hover">
<thead>
<th>ID</th>
<th>模块</th>
<th>名称</th>
2022-11-18 11:55:42 +00:00
<th>用户</th>
2022-11-21 04:50:26 +00:00
<th>月估算价格</th>
2022-11-24 00:45:36 +00:00
<th>状态</th>
2022-11-18 10:50:28 +00:00
<th>更新时间</th>
2022-11-24 00:45:36 +00:00
<th>创建时间</th>
2022-11-18 10:50:28 +00:00
<th>操作</th>
</thead>
<tbody>
@foreach ($hosts as $host)
<tr>
<td>
2022-11-18 11:39:30 +00:00
<a href="{{ route('admin.hosts.edit', $host) }}">
2022-11-18 10:50:28 +00:00
{{ $host->id }}
</a>
</td>
<td>
2022-11-20 03:56:48 +00:00
<a href="{{ route('admin.modules.show', $host->module_id) }}" class="module_name"
2022-11-18 11:55:42 +00:00
module="{{ $host->module_id }}">{{ $host->module_id }}</a>
2022-11-18 10:50:28 +00:00
</td>
<td>
{{ $host->name }}
</td>
2022-11-18 11:55:42 +00:00
<td>
<a href="{{ route('admin.users.edit', $host->user_id) }}"> {{ $host->user->name }}</a>
</td>
2022-11-21 04:50:26 +00:00
<td>
2022-11-22 11:08:31 +00:00
@if ($host->managed_price !== null)
2022-12-08 09:16:35 +00:00
<span class="text-danger">{{ $host->managed_price }} </span>
2022-11-22 11:08:31 +00:00
@else
{{ $host->price }}
@endif
2022-11-21 04:50:26 +00:00
</td>
2022-11-18 10:50:28 +00:00
<td>
2023-02-01 18:01:49 +00:00
<x-host-status :status="$host->status"/>
2022-11-18 10:50:28 +00:00
</td>
<td>
{{ $host->updated_at }}
</td>
2022-11-24 00:45:36 +00:00
<td>
{{ $host->created_at }}
</td>
2022-11-18 10:50:28 +00:00
<td>
<a href="{{ route('admin.hosts.edit', $host) }}" class="btn btn-primary btn-sm">编辑</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{-- 分页 --}}
{{ $hosts->links() }}
@endsection