feat: Inertia profile settings page, Studio edit redesign, EGS, Nova UI components\n\n- Redesign /dashboard/profile as Inertia React page (Settings/ProfileEdit)\n with SettingsLayout sidebar, Nova UI components (TextInput, Textarea,\n Toggle, Select, RadioGroup, Modal, Button), avatar drag-and-drop,\n password change, and account deletion sections\n- Redesign Studio artwork edit page with two-column layout, Nova components,\n integrated TagPicker, and version history modal\n- Add shared MarkdownEditor component\n- Add Early-Stage Growth System (EGS): SpotlightEngine, FeedBlender,\n GridFiller, AdaptiveTimeWindow, ActivityLayer, admin panel\n- Fix upload category/tag persistence (V1+V2 paths)\n- Fix tag source enum, category tree display, binding resolution\n- Add settings.jsx Vite entry, settings.blade.php wrapper\n- Update ProfileController with JSON response support for API calls\n- Various route fixes (profile.edit, toolbar settings link)"
This commit is contained in:
52
app/Http/Controllers/Web/BlogController.php
Normal file
52
app/Http/Controllers/Web/BlogController.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers\Web;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\BlogPost;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
/**
|
||||
* BlogController — /blog index + single post.
|
||||
*/
|
||||
final class BlogController extends Controller
|
||||
{
|
||||
public function index(Request $request): View
|
||||
{
|
||||
$posts = BlogPost::published()
|
||||
->orderByDesc('published_at')
|
||||
->paginate(12)
|
||||
->withQueryString();
|
||||
|
||||
return view('web.blog.index', [
|
||||
'posts' => $posts,
|
||||
'page_title' => 'Blog — Skinbase',
|
||||
'page_meta_description' => 'News, tutorials and community stories from the Skinbase team.',
|
||||
'page_canonical' => url('/blog'),
|
||||
'page_robots' => 'index,follow',
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => 'Blog', 'url' => '/blog'],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public function show(string $slug): View
|
||||
{
|
||||
$post = BlogPost::published()->where('slug', $slug)->firstOrFail();
|
||||
|
||||
return view('web.blog.show', [
|
||||
'post' => $post,
|
||||
'page_title' => ($post->meta_title ?: $post->title) . ' — Skinbase Blog',
|
||||
'page_meta_description' => $post->meta_description ?: $post->excerpt ?: '',
|
||||
'page_canonical' => $post->url,
|
||||
'page_robots' => 'index,follow',
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => 'Blog', 'url' => '/blog'],
|
||||
(object) ['name' => $post->title, 'url' => $post->url],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user