Add Blog functionality: Created BlogController with index and show methods, added blog views, and integrated localization for meta tags. Updated routes to include blog paths.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
<article class="post">
|
||||
<div class="container">
|
||||
<h1>{{ method_exists($post, 'translate') ? $post->translate('title') : $post->title }}</h1>
|
||||
@if(!empty($post->featured_image))
|
||||
<img src="{{ asset($post->featured_image) }}" alt="{{ method_exists($post, 'translate') ? $post->translate('title') : $post->title }}">
|
||||
@endif
|
||||
<div class="post-content">
|
||||
{!! method_exists($post, 'translate') ? $post->translate('content') : ($post->content ?? '') !!}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@endsection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user