如何在网站页面上制作漂亮的 table 视图? Laravel
How can I make a beautiful table view on a website page ? Laravel
需要帮助设计网站页面上的文本,我显示 table 的数据但它们看起来不太好(附上屏幕截图)帮助
我的视图文件:
@extends('layouts.layout')
@section('title')Бізнес@endsection
@section ('main_content')
<h1>Бизнес</h1>
<p>
@foreach ($business as $singleBusiness)
<li>{{ $singleBusiness->id}}</li>>
<li>{{ $singleBusiness->name}}</li>>
<li>{{ $singleBusiness->mail}}</li>>
<li>{{ $singleBusiness->website}}</li>>
@endforeach
</p>
@endsection
my plate looks like this, all records are vertical(
因此,laravel 已从包装盒中取出 bootstrap,因此您可以使用它。这是获得好成绩的最简单方法table
您可以从此页面获取表格html,然后将您的数据放入其中
https://getbootstrap.com/docs/4.5/content/tables/
像这样
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">name</th>
<th scope="col">mail</th>
<th scope="col">website</th>
</tr>
</thead>
<tbody>
@foreach ($business as $singleBusiness)
<tr>
<th scope="row">{{ $singleBusiness->id}}</th>
<td>{{ $singleBusiness->name}}</td>
<td>{{ $singleBusiness->mail}}</td>
<td>{{ $singleBusiness->website}}</td>
</tr>
@endforeach
</tbody>
</table>
需要帮助设计网站页面上的文本,我显示 table 的数据但它们看起来不太好(附上屏幕截图)帮助 我的视图文件:
@extends('layouts.layout')
@section('title')Бізнес@endsection
@section ('main_content')
<h1>Бизнес</h1>
<p>
@foreach ($business as $singleBusiness)
<li>{{ $singleBusiness->id}}</li>>
<li>{{ $singleBusiness->name}}</li>>
<li>{{ $singleBusiness->mail}}</li>>
<li>{{ $singleBusiness->website}}</li>>
@endforeach
</p>
@endsection
my plate looks like this, all records are vertical(
因此,laravel 已从包装盒中取出 bootstrap,因此您可以使用它。这是获得好成绩的最简单方法table
您可以从此页面获取表格html,然后将您的数据放入其中
https://getbootstrap.com/docs/4.5/content/tables/
像这样
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">name</th>
<th scope="col">mail</th>
<th scope="col">website</th>
</tr>
</thead>
<tbody>
@foreach ($business as $singleBusiness)
<tr>
<th scope="row">{{ $singleBusiness->id}}</th>
<td>{{ $singleBusiness->name}}</td>
<td>{{ $singleBusiness->mail}}</td>
<td>{{ $singleBusiness->website}}</td>
</tr>
@endforeach
</tbody>
</table>