Optimierung 4.3/4.4 (Kategorie): Page-Data-Service + Invokable Controller
Kategorie-/Branchenseite in CategoryPageData + Web\CategoryController. Verhalten unveraendert, 92 Web-Tests gruen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f17e9a96bc
commit
e19a209de3
3 changed files with 239 additions and 200 deletions
18
app/Http/Controllers/Web/CategoryController.php
Normal file
18
app/Http/Controllers/Web/CategoryController.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Web;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Web\CategoryPageData;
|
||||
use App\Support\WebPortalContext;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
// $edition stammt aus dem Gruppen-Prefix {edition} und steht positionsbedingt
|
||||
// vor {slug}; es wird hier nicht gebraucht, muss aber in der Signatur stehen.
|
||||
public function __invoke(string $edition, string $slug, CategoryPageData $pageData): View
|
||||
{
|
||||
return view('web.kategorie', $pageData->build(WebPortalContext::fromRequest(), $slug));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue