Add file upload function. modify paramiter FILESYSTEM_DISK=public in file .env
This commit is contained in:
39
resources/views/components/table-words.blade.php
Normal file
39
resources/views/components/table-words.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@props(['items' => []])
|
||||
@props(['fields' => []])
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID#</th>
|
||||
<th scope="col">Italian Word</th>
|
||||
<th scope="col">Dialect Translation</th>
|
||||
<th scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@forelse ($items as $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->{$fields[0]} }}</td>
|
||||
<td>{{ $item->{$fields[1]} }}</td>
|
||||
<td>
|
||||
|
||||
@can('edit-user')
|
||||
<a href="edit_record/{{ $item->id }}"><button class="btn btn-primary btn-xs">Edit</button> </a>
|
||||
@endcan
|
||||
@can('delete-user')
|
||||
<a href="delete_record/{{ $item->id }}"><button class="btn btn-danger btn-xs">Delete</button> </a>
|
||||
@endcan
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<td colspan="5">
|
||||
<span class="text-danger">
|
||||
<strong>No User Found!</strong>
|
||||
</span>
|
||||
</td>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user