Files
mikeisdeving/app/Http/Controllers/PostController.php
T
m105andClaude Sonnet 5 8d97dcbd0f Add Filament admin panel and creative public portfolio site
Adds a Filament admin (Profile settings page plus CRUD resources for
Education, Experience, Projects, and Posts) backing a public-facing
personal site: hero/about/timeline home page, project showcase, and
blog, styled with a dark editorial theme (Fraunces + Instrument Sans).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 21:10:43 +03:00

27 lines
527 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Post;
use Illuminate\View\View;
class PostController extends Controller
{
public function index(): View
{
$posts = Post::query()
->published()
->orderByDesc('published_at')
->paginate(6);
return view('posts.index', compact('posts'));
}
public function show(Post $post): View
{
abort_unless($post->published_at?->isPast(), 404);
return view('posts.show', compact('post'));
}
}