Force laravel to use https in testing and production environment.
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\View\Composers\TaxDropdown;
|
use App\View\Composers\TaxDropdown;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
|
use Illuminate\Support\Facades\View;
|
||||||
use Illuminate\Support\Number;
|
use Illuminate\Support\Number;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Translation\Translator;
|
use Illuminate\Translation\Translator;
|
||||||
@@ -31,8 +33,12 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
\Illuminate\Support\Facades\View::composer('components.tax-dropdown', TaxDropdown::class);
|
View::composer('components.tax-dropdown', TaxDropdown::class);
|
||||||
Number::useLocale(config('app.locale'));
|
Number::useLocale(config('app.locale'));
|
||||||
Number::useCurrency(config('app.currency'));
|
Number::useCurrency(config('app.currency'));
|
||||||
|
|
||||||
|
if ($this->app->environment('production') || $this->app->environment('testing')) {
|
||||||
|
URL::forceScheme('https');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user