File: /var/www/html/orbidirectory.com/resources/views/admin/blog/index.blade.php
@extends('adminlte::page')
@section('title', 'ORBI Dashboard')
@section('content_header')
<h1>Blogs</h1>
{{-- <small>Manage Blogs</small> --}}
@stop
@section('content')
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title"></h3>
<div class="card-tools">
<a href="{{ route('blog.create') }}" class="btn btn-dark"><i class="fas fa-plus"></i> Add Blog
{{-- <a href="" class="btn btn-dark"><i class="fas fa-plus"></i> Add Blog --}}
</a>
</div>
</div>
<div class="card-body">
<table class="table table-bordered blog-datatable">
<thead>
<tr>
<th>Title</th>
<th>Blog Category</th>
<th>Description</th>
<th>Author</th>
<th>Tag</th>
<th>Created Date</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
@stop
@section('js')
<script type="text/javascript">
$(function() {
var dataTable = $('.blog-datatable').DataTable({
processing: true,
serverSide: true,
pageLength: 10,
searching: false,
'ajax': {
'url': "{{ route('blog.index') }}",
},
columns: [
{
data: 'title',
name: 'Title',
},
{
data: 'category_id',
name: 'Blog Category',
},
{
data: 'description',
name: 'Description',
},
{
data: 'author',
name: 'Author'
},
{
data: 'tags',
name: 'Tag'
},
{
data: 'created_at',
name: 'Created Date',
},
{
data: 'status',
name: 'Status',
},
{
data: 'action',
name: 'Actions',
orderable: false,
searchable: false
},
]
});
});
</script>
@stop