@extends('znews.layout.blog')
@section('content')
<section id="page-content" class="page-wrapper">
<div class="zm-section bg-white pt-10 pb-40">
<div class="container">
<div class="row mb-40">
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12">
<div class="section-title">
<h2 class="h6 header-color inline-block uppercase">Categories</h2>
</div>
<div class="section-title pull-right">
<a href="{{ url('/admin/category/create') }}" class="h6 header-color inline-block uppercase">New Category</a>
</div>
</div>
</div>
<div class="row">
<!-- Start left side -->
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 columns">
<!-- ============================================================== -->
<!-- Content Start -->
<!-- ============================================================== -->
<h4 id="section2" class="mg-b-10">List of Categories</h4>
<p class="mg-b-30">Categories Information.</p>
<div class="row">
<div class="col-md-12">
<table id="articles" class="table">
<thead>
<tr>
<th scope="col">Category</th>
<th scope="col">Description</th>
<th scope="col">Articles</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
@if(isset($admincategories))
@foreach($admincategories as $category)_
<tr>
<td>{{ $category->name }}</td>
<td>{{ $category->short_url }}</td>
<td>{{ $category->rank }}</td>
<td>
<form method="post" action="{{ url('/admin/category/'.$category->id.'/delete') }}" class="form-horizontal">
{!! csrf_field() !!}
<button type="submit" class="btn btn-danger btn-rounded" id="danger-alert">Delete</button>
<a href="{{ url('/admin/category/'.$category->id.'/edit') }}" class="btn btn-warning btn-rounded">Edit</a>
<input type="hidden" name="delete" value="true">
<input type="hidden" name="category" value="{{ $category->id }}">
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div></div></div></div>
</section>
@endsection