@include('snippets.link_table', [
- 'links' => $user_links
+ 'table_id' => 'user_links_table'
])
-
- {!! $user_links->fragment('links')->render() !!}
- {{-- Add search functions --}}
@@ -50,20 +48,15 @@
@if ($role == 'admin')
Links
-
@include('snippets.link_table', [
- 'links' => $admin_links
+ 'table_id' => 'admin_links_table'
])
- {!! $admin_links->fragment('admin')->render() !!}
-
Users
@include('snippets.user_table', [
- 'users' => $admin_users
+ 'table_id' => 'admin_users_table'
])
- {!! $admin_users->fragment('admin')->render() !!}
-
@endif
@@ -112,6 +105,7 @@
{{-- Include extra JS --}}
+
diff --git a/resources/views/snippets/link_table.blade.php b/resources/views/snippets/link_table.blade.php
index e3253be..554d9a2 100644
--- a/resources/views/snippets/link_table.blade.php
+++ b/resources/views/snippets/link_table.blade.php
@@ -1,55 +1,16 @@
-
-
- Link Ending |
- Long Link |
- Clicks |
- Date |
- @if ($role == 'admin')
- Creator |
- Disable |
- Delete |
- @endif
-
-
- @foreach ($links as $link)
-
-
- @if (!empty($link->secret_key))
- {{$link->short_url}}/{{$link->secret_key}}
- @else
- {{$link->short_url}}
+
diff --git a/resources/views/snippets/user_table.blade.php b/resources/views/snippets/user_table.blade.php
index a40b05f..cc9565b 100644
--- a/resources/views/snippets/user_table.blade.php
+++ b/resources/views/snippets/user_table.blade.php
@@ -1,4 +1,17 @@
-
+
+
+
+ Username |
+ Email |
+ Created At |
+ Activated |
+ API |
+ Delete |
+
+
+
+
+{{--
Username |
Email |
@@ -33,4 +46,4 @@
@endforeach
-
+ --}}
|