summaryrefslogtreecommitdiff
path: root/resources/views
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2023-11-05 19:38:00 +0000
committerSam Light <samlight1994@gmail.com>2023-11-05 19:38:00 +0000
commit5c24746657ac23c7a65c4e4efc89cf6bfcb5a52c (patch)
tree3de215fe85096429e615127172a2cee0b56661b0 /resources/views
parentbb6795b604e5686ee069c48dd7f7ce8cc3bf73c3 (diff)
Built basic table
Diffstat (limited to 'resources/views')
-rw-r--r--resources/views/column.blade.php3
-rw-r--r--resources/views/table.blade.php28
2 files changed, 31 insertions, 0 deletions
diff --git a/resources/views/column.blade.php b/resources/views/column.blade.php
new file mode 100644
index 0000000..71f604d
--- /dev/null
+++ b/resources/views/column.blade.php
@@ -0,0 +1,3 @@
+<td {{ $attributes }} >
+ {{ $content }}
+</td>
diff --git a/resources/views/table.blade.php b/resources/views/table.blade.php
new file mode 100644
index 0000000..1938b48
--- /dev/null
+++ b/resources/views/table.blade.php
@@ -0,0 +1,28 @@
+<div>
+ <table class="table">
+ <thead>
+ <tr>
+ @foreach($columns as $column)
+ <th>{{ $column->title }}</th>
+ @endforeach
+ </tr>
+ </thead>
+ <tbody>
+ @foreach($data as $row)
+ <tr>
+ @foreach($columns as $column)
+ {{ $column->view($row) }}
+ @endforeach
+ </tr>
+ @endforeach
+ </tbody>
+ </table>
+ <div class="table-pagination d-flex justify-content-between align-items-center">
+ {{ $data->links() }}
+ <div>
+ {{ __('Showing') }} {{ $data->count() }}
+ {{ __('of') }} {{ $data->total() }}
+
+ </div>
+ </div>
+</div>