Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How To Force Redirect HTTP To HTTPS In Laravel Using ServiceProvider

<?php
  
namespace AppProviders;
  
use IlluminateSupportServiceProvider;
use IlluminatePaginationPaginator;
   
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
          
    }
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        URL::forceScheme('https');
  
        Paginator::useBootstrap();
    }
}
Source by techsolutionstuff.com #
 
PREVIOUS NEXT
Tagged: #How #To #Force #Redirect #HTTP #To #HTTPS #In #Laravel #Using #ServiceProvider
ADD COMMENT
Topic
Name
8+3 =