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
-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');
}
}
}