PHP code example of mordisacks / laravel-force-https
1. Go to this page and download the library: Download mordisacks/laravel-force-https library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mordisacks / laravel-force-https example snippets
MordiSacks\LaravelForceHttps\ServiceProvider::class,
Route::group(['middleware' => ['forceHttps']], function () {
Route::get('/home', 'HomeController@index')->name('home');
});
public function __construct()
{
$this->middleware('forceHttps');
}