- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Pages;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\SettingService;
|
|
use App\Services\AccessibilityAnalyzer;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
class PageCreateController extends Controller
|
|
{
|
|
/**
|
|
* Handle the incoming request.
|
|
*/
|
|
public function __invoke(Request $request, SettingService $settingService, AccessibilityAnalyzer $analyzer)
|
|
{
|
|
return view('admin.pages.editor', [
|
|
'page' => null,
|
|
'availableLocales' => $settingService->getSupportedLocales(),
|
|
'defaultLocale' => $settingService->get('default_locale', config('app.locale')),
|
|
'a11yIssues' => $analyzer->analyze([]),
|
|
'includeInNavigation' => false,
|
|
'permissions' => [
|
|
'view-media' => Gate::allows('view-media'),
|
|
'upload-media' => Gate::allows('upload-media'),
|
|
'update-media' => Gate::allows('update-media'),
|
|
'delete-media' => Gate::allows('delete-media'),
|
|
],
|
|
]);
|
|
}
|
|
}
|