File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/demo/Dynast/resources/views/Dashboard/Pages/meta/edit.blade.php
Back
@extends('layouts.dashboardLayout') @section('title', 'Update Page Meta Data') @section('content') <div class="container-fluid"> <div class="card shadow mb-4"> <div class="card-header py-3"> <div class="row"> <div class="col-md-8"> <h6 class="m-0 font-weight-bold text-primary">Edit Meta Record for: <code>{{ $meta->page_path }}</code></h6> </div> <div class="col-md-4 text-end"> <a href="{{ route('meta.index') }}" class="btn btn-primary btn-sm float-right"><i class="fas fa-arrow-left"></i> Back</a> </div> </div> </div> <div class="card-body"> {{-- Form targets the 'meta.update' route and uses the PUT method --}} <form action="{{ route('meta.update', $meta->id) }}" method="POST"> @csrf @method('PUT') {{-- Required for the update method in the controller --}} {{-- SECTION 1: IDENTIFICATION & ROBOTS --}} <h5 class="mt-4 text-primary">Page Setup & Indexing</h5> <hr class="mt-1"> <div class="row"> {{-- Page Path --}} <div class="col-md-6 mb-3"> <label for="page_path" class="form-label">Page Path (Slug)</label> <input type="text" class="form-control @error('page_path') is-invalid @enderror" id="page_path" name="page_path" value="{{ old('page_path', $meta->page_path) }}" placeholder="/about-us or /"> <small class="form-text text-muted">Use `/` for the homepage. Must be unique.</small> @error('page_path')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> {{-- Robots Indexing --}} <div class="col-md-6 mb-3"> <label for="robots" class="form-label">Robots Indexing</label> <select class="form-control @error('robots') is-invalid @enderror" id="robots" name="robots"> {{-- Check old value first, then the existing database value --}} <option value="index, follow" {{ old('robots', $meta->robots) == 'index, follow' ? 'selected' : '' }}>index, follow (Default)</option> <option value="noindex, follow" {{ old('robots', $meta->robots) == 'noindex, follow' ? 'selected' : '' }}>noindex, follow</option> <option value="noindex, nofollow" {{ old('robots', $meta->robots) == 'noindex, nofollow' ? 'selected' : '' }}>noindex, nofollow</option> </select> @error('robots')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> </div> {{-- SECTION 2: CORE SEO TAGS --}} <h5 class="mt-4 text-primary">Core SEO Tags</h5> <hr class="mt-1"> <div class="mb-3"> <label for="title" class="form-label">Meta Title (max ~60 chars)</label> <input type="text" class="form-control @error('title') is-invalid @enderror" id="title" name="title" value="{{ old('title', $meta->title) }}" maxlength="255"> @error('title')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> <div class="mb-3"> <label for="description" class="form-label">Meta Description (max ~160 chars)</label> <textarea class="form-control @error('description') is-invalid @enderror" id="description" name="description" rows="3">{{ old('description', $meta->description) }}</textarea> @error('description')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="keywords" class="form-label">Keywords (Comma Separated)</label> <input type="text" class="form-control @error('keywords') is-invalid @enderror" id="keywords" name="keywords" value="{{ old('keywords', $meta->keywords) }}" maxlength="255"> @error('keywords')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> <div class="col-md-6 mb-3"> <label for="canonical_url" class="form-label">Canonical URL</label> <input type="url" class="form-control @error('canonical_url') is-invalid @enderror" id="canonical_url" name="canonical_url" value="{{ old('canonical_url', $meta->canonical_url) }}" maxlength="255"> <small class="form-text text-muted">Leave blank unless necessary. Must be a full URL.</small> @error('canonical_url')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> </div> {{-- SECTION 3: OPEN GRAPH (Social Media) --}} <h5 class="mt-4 text-primary">Open Graph (Facebook/LinkedIn)</h5> <hr class="mt-1"> <div class="row"> <div class="col-md-6 mb-3"> <label for="og_title" class="form-label">OG Title (If different from Meta Title)</label> <input type="text" class="form-control" id="og_title" name="og_title" value="{{ old('og_title', $meta->og_title) }}"> </div> <div class="col-md-6 mb-3"> <label for="og_site_name" class="form-label">OG Site Name (e.g., "The Corbett Sapphire")</label> <input type="text" class="form-control" id="og_site_name" name="og_site_name" value="{{ old('og_site_name', $meta->og_site_name) }}"> </div> </div> <div class="mb-3"> <label for="og_description" class="form-label">OG Description</label> <textarea class="form-control" id="og_description" name="og_description" rows="2">{{ old('og_description', $meta->og_description) }}</textarea> </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="og_image" class="form-label">OG Image URL (1200x630 recommended)</label> <input type="url" class="form-control @error('og_image') is-invalid @enderror" id="og_image" name="og_image" value="{{ old('og_image', $meta->og_image) }}"> @error('og_image')<div class="invalid-feedback d-block">{{ $message }}</div>@enderror </div> <div class="col-md-3 mb-3"> <label for="og_type" class="form-label">OG Type</label> <select class="form-control" id="og_type" name="og_type"> <option value="website" {{ old('og_type', $meta->og_type) == 'website' ? 'selected' : '' }}>Website (Default)</option> <option value="article" {{ old('og_type', $meta->og_type) == 'article' ? 'selected' : '' }}>Article</option> <option value="product" {{ old('og_type', $meta->og_type) == 'product' ? 'selected' : '' }}>Product</option> </select> </div> <div class="col-md-3 mb-3"> <label for="og_locale" class="form-label">OG Locale</label> <input type="text" class="form-control" id="og_locale" name="og_locale" value="{{ old('og_locale', $meta->og_locale) }}"> </div> </div> {{-- SECTION 4: TWITTER CARDS --}} <h5 class="mt-4 text-primary">Twitter Card</h5> <hr class="mt-1"> <div class="row"> <div class="col-md-6 mb-3"> <label for="twitter_card" class="form-label">Twitter Card Type</label> <select class="form-control" id="twitter_card" name="twitter_card"> <option value="summary_large_image" {{ old('twitter_card', $meta->twitter_card) == 'summary_large_image' ? 'selected' : '' }}>Summary Large Image (Recommended)</option> <option value="summary" {{ old('twitter_card', $meta->twitter_card) == 'summary' ? 'selected' : '' }}>Summary</option> </select> </div> <div class="col-md-6 mb-3"> <label for="twitter_site" class="form-label">Twitter Site (@username)</label> <input type="text" class="form-control" id="twitter_site" name="twitter_site" value="{{ old('twitter_site', $meta->twitter_site) }}" placeholder="@yourcompany"> </div> </div> <div class="mb-3"> <label for="twitter_title" class="form-label">Twitter Title</label> <input type="text" class="form-control" id="twitter_title" name="twitter_title" value="{{ old('twitter_title', $meta->twitter_title) }}"> </div> <div class="mb-3"> <label for="twitter_description" class="form-label">Twitter Description</label> <textarea class="form-control" id="twitter_description" name="twitter_description" rows="2">{{ old('twitter_description', $meta->twitter_description) }}</textarea> </div> <div class="mb-3"> <label for="twitter_image" class="form-label">Twitter Image URL</label> <input type="url" class="form-control @error('twitter_image') is-invalid @enderror" id="twitter_image" name="twitter_image" value="{{ old('twitter_image', $meta->twitter_image) }}"> @error('twitter_image')<div class="invalid-feedback d-block">{{ $message }}</div>@enderror </div> {{-- SECTION 5: HREFLANG (Advanced) --}} <h5 class="mt-4 text-primary">Hreflang / Alternate Links (Advanced)</h5> <hr class="mt-1"> <div class="mb-3"> <label for="alternate_links" class="form-label">Alternate Links (JSON format)</label> {{-- Note: We use json_encode here to display the array/object stored in the database as a JSON string for editing --}} <textarea class="form-control @error('alternate_links') is-invalid @enderror" id="alternate_links" name="alternate_links" rows="3" placeholder='Example: {"en": "https://site.com/en/page", "fr": "https://site.com/fr/page"}'>{{ old('alternate_links', json_encode($meta->alternate_links, JSON_PRETTY_PRINT)) }}</textarea> <small class="form-text text-muted">Use valid JSON string to map language codes to full URLs.</small> @error('alternate_links')<div class="invalid-feedback">{{ $message }}</div>@enderror </div> <div class="mt-4"> <button type="submit" class="btn btn-success"><i class="fas fa-upload"></i> Update Meta Data</button> <a href="{{ route('meta.index') }}" class="btn btn-secondary">Cancel</a> </div> </form> </div> </div> </div> @endsection
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings