Add (post manage)
Add (post country viewing)
This commit is contained in:
68
resources/views/admin/posts/manage.blade.php
Normal file
68
resources/views/admin/posts/manage.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.admin.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-xl">
|
||||
<!-- Page title -->
|
||||
<div class="page-header d-print-none">
|
||||
<h2 class="page-title">
|
||||
{{ __('Posts') }}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
|
||||
<div class="alert alert-info">
|
||||
<div class="alert-title">Manage your blog posts here.</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex mb-3">
|
||||
<div><a href="{{ route('posts.manage.new') }}" class="btn">New Post</a></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('Post #') }}</th>
|
||||
<th>
|
||||
Image
|
||||
</th>
|
||||
<th>Title</th>
|
||||
<th>{{ __('Created at') }}</th>
|
||||
<th>{{ __('Updated in') }}</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($posts as $post)
|
||||
<tr>
|
||||
<td>{{ $post->id }}</td>
|
||||
<td><img width="80" height="60" src="{{ $post->featured_image }}"
|
||||
class="img-fluid rounded-2" alt=""></td>
|
||||
<td>
|
||||
<a
|
||||
href="{{ route('home.country.post', ['country' => $post->post_category->category->country_locale_slug, 'post_slug' => $post->slug]) }}">{{ $post->title }}</a>
|
||||
|
||||
</td>
|
||||
<td>{{ $post->created_at }}</td>
|
||||
<td>{{ $post->updated_at->diffForhumans() }}</td>
|
||||
<td>
|
||||
<div><a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
|
||||
class="btn">Edit</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($posts->hasPages())
|
||||
<div class="card-footer pb-0">
|
||||
{{ $posts->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user