added ForceHttpsServiceProvider, added fix in PageResourceList

This commit is contained in:
F4ilji
2025-04-17 20:07:08 +05:00
parent 4fcc41e36e
commit 21c4b7c528
8 changed files with 39 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class PageObserver
*/
public function updated(Page $page): void
{
$this->pageCacheService->clearCache($page);
$this->pageCacheService->clearAllCacheByModel();
}
/**
-2
View File
@@ -49,7 +49,6 @@ use Filament\Facades\Filament;
use Filament\Support\Facades\FilamentView;
use Filament\Tables\View\TablesRenderHook;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Sleep;
@@ -73,7 +72,6 @@ class AppServiceProvider extends ServiceProvider
self::setObserversByModel();
self::setLocaleTime();
Model::preventLazyLoading(!app()->isProduction());
// URL::forceScheme('https');
self::registerFilamentNavigationGroups();
$this->loadViewsFrom(__DIR__.'/path/to/views', 'checkpoint');
@@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class ForceHttpsServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
}
}
+1
View File
@@ -171,6 +171,7 @@ return [
App\Providers\Filament\AdminPanelProvider::class,
App\Providers\Filament\DashboardPanelProvider::class,
App\Providers\RouteServiceProvider::class,
\App\Providers\ForceHttpsServiceProvider::class,
])->toArray(),
/*
@@ -1,7 +1,7 @@
<!-- NavLink.vue -->
<template>
<div>
<h2 :id="generateSlug(nameList)" class="mb-3 font-medium text-gray-800 dark:text-neutral-200">
<h2 :id="'anchor-link-' + generateSlug(nameList)" class="mb-3 font-medium text-gray-800 dark:text-neutral-200">
{{ nameList }}
</h2>
<ul class="list-disc ms-6 mt-3 space-y-1.5">
@@ -7,7 +7,6 @@
</div>
</div>
<div v-else>
<div v-if="block.data.settings.in_modal">
<button type="button" class="w-full py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-primary text-white hover:bg-primary-light focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none" aria-haspopup="dialog" aria-expanded="false" aria-controls="hs-vertically-centered-scrollable-modal" data-hs-overlay="#hs-vertically-centered-scrollable-modal">
{{ form.data.title }}
@@ -33,7 +32,6 @@
</div>
</div>
</div>
<div v-else>
<FormBuilder :blocks="form" />
</div>
@@ -24,16 +24,15 @@
<div class="flex overflow-x-auto space-x-6 mb-10 lg:mb-14 p-4">
<!-- Card -->
<a v-for="item in resource.data.content" class="group flex-shrink-0 w-64 flex flex-col bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition" :href="item.link">
<div class="aspect-w-16 aspect-h-9">
<img v-if="item.image" class="w-full backdrop-blur-xl object-cover rounded-t-xl h-[150px]" :src="'/storage/' + item.image" alt="Blog Image">
<div v-else :class="randomBgClass()" class="w-full object-cover rounded-t-xl h-[150px] bg-gradient-to-tr" />
<a v-for="item in resource.data.content" class="group flex-shrink-0 w-64 flex flex-col bg-white border shadow-sm rounded-xl focus:outline-none focus:shadow-md transition" :href="item.link">
<div class="aspect-w-16 aspect-h-9 p-3 rounded-xl m-1 group-hover:bg-gray-100">
<img v-if="item.image" class="w-full backdrop-blur-xl rounded-xl object-cover h-[150px]" :src="'/storage/' + item.image" alt="Blog Image">
<div v-else :class="randomBgClass()" class="w-full rounded-xl object-cover h-[150px] bg-gradient-to-tr" />
</div>
<div class="p-4 md:p-5">
<p class="mt-2 text-xs uppercase text-gray-600">{{ item.model_select }}</p>
<h3 class="mt-2 text-lg font-medium text-gray-800 group-hover:text-primary-hover">{{ item.title }}</h3>
<div class="px-5 pb-4">
<h3 class="mt-2 truncate text-base font-medium text-gray-800 group-hover:text-primary-hover">{{ item.title }}</h3>
<p class="mt-2 text-xs text-gray-600">{{ item.link_text }}</p>
</div>
</div>
</a>
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
{{-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">--}}
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
{{-- <title inertia>{{ config('app.name', 'Laravel') }}</title>--}}