fix: Replace hardcoded paths with route/url helpers for subdirectory support
Files updated:
- layouts/knowledge-base.blade.php - Use url('/') for home link
- layouts/navigation.blade.php - Use url('/') for nav links
- layouts/guest.blade.php - Use url('/') for logo link
- Document.php - Use route() for wiki links
- DocumentLink.php - Use route() for URL attribute
- AuthenticatedSessionController.php - Use url('/') for redirects
- DocumentEditor.php - Use url('/') for redirect
- ProfileController.php - Use url('/') for redirect
This ensures the app works when deployed in a subdirectory
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<body class="font-sans text-gray-900 antialiased">
|
||||
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100">
|
||||
<div>
|
||||
<a href="/">
|
||||
<a href="{{ url('/') }}">
|
||||
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="max-w-full mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between h-16">
|
||||
<div class="flex items-center space-x-3">
|
||||
<a href="/" class="flex items-center space-x-3">
|
||||
<a href="{{ url('/') }}" class="flex items-center space-x-3">
|
||||
<x-application-logo class="block h-8 w-auto fill-current text-gray-800" />
|
||||
<h1 class="text-xl font-semibold text-gray-900">
|
||||
{{ config('app.name', 'Knowledge Base') }}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('messages.nav.dashboard') }}
|
||||
</x-nav-link>
|
||||
<x-nav-link href="/" :active="false">
|
||||
<x-nav-link :href="url('/')" :active="false">
|
||||
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"></path>
|
||||
</svg>
|
||||
@@ -82,7 +82,7 @@
|
||||
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('messages.nav.dashboard') }}
|
||||
</x-responsive-nav-link>
|
||||
<x-responsive-nav-link href="/" :active="false">
|
||||
<x-responsive-nav-link :href="url('/')" :active="false">
|
||||
{{ __('messages.nav.knowledge_base') }}
|
||||
</x-responsive-nav-link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user