Commit b5a908b1 authored by alisson's avatar alisson
Browse files

update boot

parent b94d68d2
...@@ -6,6 +6,7 @@ use Illuminate\Pagination\Paginator; ...@@ -6,6 +6,7 @@ use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Routing\UrlGenerator;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
...@@ -24,8 +25,12 @@ class AppServiceProvider extends ServiceProvider ...@@ -24,8 +25,12 @@ class AppServiceProvider extends ServiceProvider
* *
* @return void * @return void
*/ */
public function boot() public function boot(UrlGenerator $url)
{ {
if (env('APP_ENV') !== 'local') { //so you can work on it locally
$url->forceScheme('https');
}
Paginator::useBootstrap(); Paginator::useBootstrap();
Collection::macro('paginate', function($perPage, $total = null, $page = null, $pageName = 'page'): LengthAwarePaginator { Collection::macro('paginate', function($perPage, $total = null, $page = null, $pageName = 'page'): LengthAwarePaginator {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment