- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
31 lines
957 B
PHP
31 lines
957 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Navigation;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Requests\Admin\Navigation\ViewNavigationRequest;
|
|
use App\Services\NavigationService;
|
|
use App\Models\Page;
|
|
|
|
/**
|
|
* Controller for displaying the navigation management UI.
|
|
*/
|
|
class NavigationIndexController extends Controller
|
|
{
|
|
/**
|
|
* Display the navigation management UI.
|
|
*
|
|
* @param \App\Http\Requests\Admin\Navigation\ViewNavigationRequest $request
|
|
* @param \App\Services\NavigationService $navigationService
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function __invoke(ViewNavigationRequest $request, NavigationService $navigationService)
|
|
{
|
|
return view('admin.navigation.index', [
|
|
'items' => $navigationService->getManagementItems(),
|
|
'pages' => Page::select('id', 'title', 'slug')->get(),
|
|
'parentItems' => $navigationService->getParentItems(),
|
|
]);
|
|
}
|
|
}
|