datatable.directory codebase
https://datatable.directory/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
985 B
39 lines
985 B
@extends('layouts.app')
|
|
|
|
@php
|
|
/** @var \App\Models\Table $table */
|
|
@endphp
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<h2>{{ $table->title }}</h2>
|
|
</div>
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-8">
|
|
<table class="table table-hover table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
@foreach($columns as $col)
|
|
<th>{{ $col->title }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($rows as $row)
|
|
<tr>
|
|
<td>#{{ $row->id }}</td>
|
|
@php($rdata = json_decode($row['data'], true))
|
|
@foreach($columns as $col)
|
|
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|