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.
datatable.directory/resources/views/table/view.blade.php

40 lines
923 B

{{-- Basic table view --}}
@extends('layouts.app')
@php
/** @var \App\Models\Table $table */
@endphp
@section('content')
7 years ago
<div class="row justify-content-center">
<h2>{{ $table->title }}</h2>
</div>
<div class="row justify-content-center">
7 years ago
<div class="col-md-10">
<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>
@endsection