seo fixes
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Page;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -21,6 +22,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Always generate absolute URLs (route(), url(), canonical tags, sitemap,
|
||||
// JSON-LD, ...) from the configured APP_URL, not the incoming request's
|
||||
// Host header. Without this, www vs apex requests each produce
|
||||
// self-referencing canonical URLs for identical content.
|
||||
URL::forceRootUrl(config('app.url'));
|
||||
|
||||
View::composer('components.layouts.app', function ($view) {
|
||||
$view->with('footerPages', Page::published()->inFooter()->get());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user