categories.show
This commit is contained in:
parent
e5837c0537
commit
f63f5bab04
3 changed files with 12 additions and 2 deletions
|
@ -40,7 +40,7 @@ public function show(Category $category)
|
|||
{
|
||||
$this->authorize('view', $category);
|
||||
|
||||
return $category;
|
||||
return View::make('categories.show', ['category' => $category]);
|
||||
}
|
||||
|
||||
public function update(CategoryRequest $request, Category $category)
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
x-bind:class="{ 'highlighted': hovered === $el.id }"
|
||||
>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="{{ route('categories.show', $category->id) }}">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
8
resources/views/categories/show.blade.php
Normal file
8
resources/views/categories/show.blade.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<x-app-layout>
|
||||
<x-slot:title>
|
||||
Category: {{ $category->name }}
|
||||
</x-slot>
|
||||
|
||||
<h2>{{ $category->name }}</h2>
|
||||
<a href="{{ route('categories.index') }}">All</a>
|
||||
</x-app-layout>
|
Loading…
Reference in a new issue