File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/demo/Dynast/resources/views/Dashboard/Pages/meta/index.blade.php
Back
@extends('layouts.dashboardLayout') @section('title', 'Manage Page Meta Data') @section('content') <div class="container-fluid"> {{-- Success/Error Messages --}} @if (session('success')) <div class="alert alert-success alert-dismissible fade show" role="alert"> {{ session('success') }} <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> </div> @endif @if (session('error')) <div class="alert alert-danger alert-dismissible fade show" role="alert"> {{ session('error') }} <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> </div> @endif <div class="card shadow mb-4"> <div class="card-header py-3 d-flex justify-content-between align-items-center"> <h6 class="m-0 font-weight-bold text-primary">All Page Meta Records</h6> {{-- ADD NEW BUTTON --}} <a href="{{ route('meta.create') }}" class="btn btn-primary btn-sm"> <i class="fas fa-plus"></i> Add New Meta </a> </div> <div class="card-body"> <div class="table-responsive"> @if ($metas->isEmpty()) <p>No page meta records found. Click "Add New Meta" to get started.</p> @else <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>ID</th> <th>Page Path</th> <th>Title</th> <th>Description Snippet</th> <th>Robots</th> <th>Last Updated</th> <th width="15%">Actions</th> </tr> </thead> <tbody> @foreach ($metas as $meta) <tr> <td>{{ $meta->id }}</td> {{-- Highlight the homepage path --}} <td> <strong> @if ($meta->page_path === '/') {{ $meta->page_path }} (Homepage) @else {{ $meta->page_path }} @endif </strong> </td> <td>{{ Str::limit($meta->title, 50) }}</td> <td>{{ Str::limit($meta->description, 70) }}</td> <td><span class="badge {{ $meta->robots === 'noindex, nofollow' ? 'bg-danger' : 'bg-success' }} text-white">{{ $meta->robots }}</span></td> <td>{{ $meta->updated_at->format('M d, Y H:i') }}</td> <td> {{-- EDIT BUTTON --}} <a href="{{ route('meta.edit', $meta->id) }}" class="btn btn-info btn-sm"> <i class="fas fa-edit"></i> Edit </a> {{-- DELETE FORM (using a small form for DELETE request) --}} <form action="{{ route('meta.destroy', $meta->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete the meta data for {{ $meta->page_path }}?');"> @csrf @method('DELETE') <button type="submit" class="btn btn-danger btn-sm"> <i class="fas fa-trash-alt"></i> Delete </button> </form> </td> </tr> @endforeach </tbody> </table> @endif </div> {{-- PAGINATION LINKS --}} <div class="d-flex justify-content-center"> {{ $metas->links() }} </div> </div> </div> </div> @endsection
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings