mohamedhk2 / laravel-prod-tools
Laravel Prod Tools
v1.0.3
2022-08-19 17:29 UTC
README
Packages
Removed packages
package | replaced by | version | reason |
---|---|---|---|
ecrmnn/laravel-https | ^1.0.3 | Not support Laravel ^9.x |
Install
The recommended way to install this is through composer:
composer require "mohamedhk2/laravel-prod-tools:1.0.3"
Laravel Force SSL
Add under
`providers
in
config/app.php
`\Ecrmnn\LaravelHttps\Providers\ServiceProvider::class,
Add under
`$middleware
in
app/Http/Kernel.php
`\Ecrmnn\LaravelHttps\Http\Middleware\ForceHttps::class,
Update the following in your
.env
:
:warning: HTTPS will only be forced when`env('HTTPS')
is set to
true
` :warning:HTTPS=true
Laravel non-WWW Redirect
Add the middleware class to your Kernel.php in App\Http:
protected $middlewareGroups = [ 'web' => [ ... \LaravelNonWwwRedirect\LaravelNonWwwRedirectMiddleware::class, ], ];
License
The Laravel Prod Tools is open-sourced software licensed under the MIT license