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:
75
app/Http/Controllers/Web/PageController.php
Normal file
75
app/Http/Controllers/Web/PageController.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers\Web;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Page;
|
||||
use Illuminate\View\View;
|
||||
|
||||
/**
|
||||
* PageController — DB-driven static pages (/pages/:slug).
|
||||
*
|
||||
* Also handles root-level marketing pages (/about, /help, /contact)
|
||||
* and legal pages (/legal/terms, /legal/privacy, /legal/cookies).
|
||||
*/
|
||||
final class PageController extends Controller
|
||||
{
|
||||
public function show(string $slug): View
|
||||
{
|
||||
$page = Page::published()->where('slug', $slug)->firstOrFail();
|
||||
|
||||
return view('web.pages.show', [
|
||||
'page' => $page,
|
||||
'page_title' => ($page->meta_title ?: $page->title) . ' — Skinbase',
|
||||
'page_meta_description' => $page->meta_description ?: '',
|
||||
'page_canonical' => $page->canonical_url,
|
||||
'page_robots' => 'index,follow',
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => $page->title, 'url' => $page->url],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serve root-level marketing slugs (/about, /help, /contact).
|
||||
* Falls back to 404 if no matching page exists.
|
||||
*/
|
||||
public function marketing(string $slug): View
|
||||
{
|
||||
$page = Page::published()->where('slug', $slug)->firstOrFail();
|
||||
|
||||
return view('web.pages.show', [
|
||||
'page' => $page,
|
||||
'page_title' => ($page->meta_title ?: $page->title) . ' — Skinbase',
|
||||
'page_meta_description' => $page->meta_description ?: '',
|
||||
'page_canonical' => url('/' . $slug),
|
||||
'page_robots' => 'index,follow',
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => $page->title, 'url' => '/' . $slug],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Legal pages (/legal/terms, /legal/privacy, /legal/cookies).
|
||||
* Looks for page with slug "legal-{section}".
|
||||
*/
|
||||
public function legal(string $section): View
|
||||
{
|
||||
$page = Page::published()->where('slug', 'legal-' . $section)->firstOrFail();
|
||||
|
||||
return view('web.pages.show', [
|
||||
'page' => $page,
|
||||
'page_title' => ($page->meta_title ?: $page->title) . ' — Skinbase',
|
||||
'page_meta_description' => $page->meta_description ?: '',
|
||||
'page_canonical' => url('/legal/' . $section),
|
||||
'page_robots' => 'index,follow',
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => 'Legal', 'url' => '#'],
|
||||
(object) ['name' => $page->title, 'url' => '/legal/' . $section],
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user