Eshop-Laravel/resources/views/cms/categories.blade.php

48 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
@extends('cms.cms-master')
@section('main_content')
<h2>Edit Site Categories</h2>
<div class="row">
<div class="col-md-12">
<p>
<a class="btn btn-primary" href="{{ url('cms/categories/create') }}">+Add New Category</a>
</p>
</div>
</div>
<br><br>
<div class="row">
<div class="col-md-8">
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Image</th>
<th>Title</th>
<th>Article</th>
<th>Updated_at</th>
<th>Created_at</th>
</tr>
</thead>
<tbody>
@foreach ($categories as $item)
<tr>
<td>#{{$item['id']}}</td>
<td><img width="60" src="{{asset('images').'/'. $item['image']}}" alt=""></td>
<td>{{$item['title']}}</td>
<td>{{$item['article']}}</td>
<td>{{$item['updated_at']}}</td>
<td>{{$item['created_at']}}</td>
<td>
<a href="{{url('cms/categories/'.$item['id'] . '/' . 'edit')}}">Edit </a>|
<a href="{{url('cms/categories' .'/' . $item['id'])}}">Delete</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection