This commit is contained in:
Mark Gregory
2026-07-24 10:30:36 +01:00
parent 10e9c25d6c
commit 395e4dc545
94 changed files with 619 additions and 160 deletions
@@ -0,0 +1,3 @@
<?php
namespace Modules\Blog\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\View\View; use Modules\Blog\Models\Blog;
final class PublicBlogController extends Controller { public function index(): View { return view('blog::public.index',['records'=>Blog::published()->with(['author','category'])->latest('published_at')->paginate(12)]); } public function show(string $slug): View { return view('blog::public.show',['record'=>Blog::published()->with(['author','category','tags'])->where('slug',$slug)->firstOrFail()]); } }