Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
b5a908b1
Commit
b5a908b1
authored
Nov 15, 2023
by
alisson
Browse files
update boot
parent
b94d68d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Providers/AppServiceProvider.php
View file @
b5a908b1
...
...
@@ -6,6 +6,7 @@ use Illuminate\Pagination\Paginator;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\Collection
;
use
Illuminate\Pagination\LengthAwarePaginator
;
use
Illuminate\Routing\UrlGenerator
;
class
AppServiceProvider
extends
ServiceProvider
{
...
...
@@ -24,8 +25,12 @@ class AppServiceProvider extends ServiceProvider
*
* @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
();
Collection
::
macro
(
'paginate'
,
function
(
$perPage
,
$total
=
null
,
$page
=
null
,
$pageName
=
'page'
):
LengthAwarePaginator
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment