Laravel unable to retrieve the correct current page no. which result pagination is not working(showing the first page result only)Laravel - Paginating Eloquent Retrieved resultsLaravel Multiple Pagination in one pageLaravel pagination shows a link for every pageLaravel pagination show results on pagesLaravel Paginator always returning full list on every pageLaravel 5: ErrorException in LengthAwarePaginator.php: Division by zeroPagination after search only works on the first pagelaravel Paginator with ajax shows the first page onlyLaravel pagination is not working after first pageLaravel: reverse the result of pagination
Why does the trade federation become so alarmed upon learning the ambassadors are Jedi Knights?
Does entangle require vegetation?
Why exactly was “Star Wars: Clone Wars” (2003) excluded from Disney Canon?
Would letting a multiclass character rebuild their character to be single-classed be game-breaking?
Project Euler, problem # 9, Pythagorean triplet
How to make a niche out of an object
When is pointing out a person's hypocrisy not considered to be a logical fallacy?
Why does the autopilot disengage even when it does not receive pilot input?
Hacker Rank : Electronics Shop
Verifying Hamiltonian Cycle solution in O(n^2), n is the length of the encoding of G
Possible isometry groups of open manifolds
Align by center of symbol
Won 50K! Now what should I do with it
How might the United Kingdom become a republic?
Can I activate an iPhone without an Apple ID?
Players of unusual orchestral instruments
Why are Japanese translated subtitles non-conversational?
Why limit to revolvers?
Was adding milk to tea started to reduce employee tea break time?
Why can't air tickets just accept only the passport number without any names?
What's the difference between soft PWM and PWM
Access files in Home directory from live mode
Back to the nineties!
Ragged justification of captions depending on odd/even page
Laravel unable to retrieve the correct current page no. which result pagination is not working(showing the first page result only)
Laravel - Paginating Eloquent Retrieved resultsLaravel Multiple Pagination in one pageLaravel pagination shows a link for every pageLaravel pagination show results on pagesLaravel Paginator always returning full list on every pageLaravel 5: ErrorException in LengthAwarePaginator.php: Division by zeroPagination after search only works on the first pagelaravel Paginator with ajax shows the first page onlyLaravel pagination is not working after first pageLaravel: reverse the result of pagination
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Let us consider an example
https://www.example.net/xyz?page=2
Route::get('/xyz', 'controller@getpages');
public function getpages()
$variable=Model::paginate(10);
dd($variable);
i have done "dd($variable);" in function . which gives the result of
LengthAwarePaginator #1209 ▼
#total: 4341
#lastPage: 435
#items: Collection #1211 ▶
#perPage: 10
#currentPage: 1
#path: "www.example.net/xyz"
#query: []
#fragment: null
#pageName: "page"
dd($request);
Request #38 ▼
#json: null
#convertedFiles: null
#userResolver: Closure #1028 ▶
#routeResolver: Closure #1029 ▶
+attributes: ParameterBag #40 ▶
+request: ParameterBag #46 ▶
+query: ParameterBag #46 ▶
+server: ServerBag #42 ▶
+files: FileBag #43 ▶
+cookies: ParameterBag #41 ▶
+headers: HeaderBag #44 ▶
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: null
#pathInfo: "/xyz"
#requestUri: "/xyz?page=2"
#baseUrl: ""
#basePath: null
#method: "GET"
#format: null
#session: Store #112 ▶
#locale: null
#defaultLocale: "en"
-isForwardedValid: true
dd($request->all());
it is showing
array:1 [▼
"/xyz" => null
]
in the site which have error. but rest of the sites whose pagination working properly . gives the below output.
array:1 [▼
"page" => "2"
]
instead of #currentPage: 2 . it was working properly, But from yesterday it is happening like this through all our site. so how can I fix this?
Note: I have used this same code in multipage sites. but it is not working in it only
i got the proper issue here.In our whole site the passing to controller . and in validation . it is not mention how can i resolve this.
laravel pagination
|
show 10 more comments
Let us consider an example
https://www.example.net/xyz?page=2
Route::get('/xyz', 'controller@getpages');
public function getpages()
$variable=Model::paginate(10);
dd($variable);
i have done "dd($variable);" in function . which gives the result of
LengthAwarePaginator #1209 ▼
#total: 4341
#lastPage: 435
#items: Collection #1211 ▶
#perPage: 10
#currentPage: 1
#path: "www.example.net/xyz"
#query: []
#fragment: null
#pageName: "page"
dd($request);
Request #38 ▼
#json: null
#convertedFiles: null
#userResolver: Closure #1028 ▶
#routeResolver: Closure #1029 ▶
+attributes: ParameterBag #40 ▶
+request: ParameterBag #46 ▶
+query: ParameterBag #46 ▶
+server: ServerBag #42 ▶
+files: FileBag #43 ▶
+cookies: ParameterBag #41 ▶
+headers: HeaderBag #44 ▶
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: null
#pathInfo: "/xyz"
#requestUri: "/xyz?page=2"
#baseUrl: ""
#basePath: null
#method: "GET"
#format: null
#session: Store #112 ▶
#locale: null
#defaultLocale: "en"
-isForwardedValid: true
dd($request->all());
it is showing
array:1 [▼
"/xyz" => null
]
in the site which have error. but rest of the sites whose pagination working properly . gives the below output.
array:1 [▼
"page" => "2"
]
instead of #currentPage: 2 . it was working properly, But from yesterday it is happening like this through all our site. so how can I fix this?
Note: I have used this same code in multipage sites. but it is not working in it only
i got the proper issue here.In our whole site the passing to controller . and in validation . it is not mention how can i resolve this.
laravel pagination
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37
|
show 10 more comments
Let us consider an example
https://www.example.net/xyz?page=2
Route::get('/xyz', 'controller@getpages');
public function getpages()
$variable=Model::paginate(10);
dd($variable);
i have done "dd($variable);" in function . which gives the result of
LengthAwarePaginator #1209 ▼
#total: 4341
#lastPage: 435
#items: Collection #1211 ▶
#perPage: 10
#currentPage: 1
#path: "www.example.net/xyz"
#query: []
#fragment: null
#pageName: "page"
dd($request);
Request #38 ▼
#json: null
#convertedFiles: null
#userResolver: Closure #1028 ▶
#routeResolver: Closure #1029 ▶
+attributes: ParameterBag #40 ▶
+request: ParameterBag #46 ▶
+query: ParameterBag #46 ▶
+server: ServerBag #42 ▶
+files: FileBag #43 ▶
+cookies: ParameterBag #41 ▶
+headers: HeaderBag #44 ▶
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: null
#pathInfo: "/xyz"
#requestUri: "/xyz?page=2"
#baseUrl: ""
#basePath: null
#method: "GET"
#format: null
#session: Store #112 ▶
#locale: null
#defaultLocale: "en"
-isForwardedValid: true
dd($request->all());
it is showing
array:1 [▼
"/xyz" => null
]
in the site which have error. but rest of the sites whose pagination working properly . gives the below output.
array:1 [▼
"page" => "2"
]
instead of #currentPage: 2 . it was working properly, But from yesterday it is happening like this through all our site. so how can I fix this?
Note: I have used this same code in multipage sites. but it is not working in it only
i got the proper issue here.In our whole site the passing to controller . and in validation . it is not mention how can i resolve this.
laravel pagination
Let us consider an example
https://www.example.net/xyz?page=2
Route::get('/xyz', 'controller@getpages');
public function getpages()
$variable=Model::paginate(10);
dd($variable);
i have done "dd($variable);" in function . which gives the result of
LengthAwarePaginator #1209 ▼
#total: 4341
#lastPage: 435
#items: Collection #1211 ▶
#perPage: 10
#currentPage: 1
#path: "www.example.net/xyz"
#query: []
#fragment: null
#pageName: "page"
dd($request);
Request #38 ▼
#json: null
#convertedFiles: null
#userResolver: Closure #1028 ▶
#routeResolver: Closure #1029 ▶
+attributes: ParameterBag #40 ▶
+request: ParameterBag #46 ▶
+query: ParameterBag #46 ▶
+server: ServerBag #42 ▶
+files: FileBag #43 ▶
+cookies: ParameterBag #41 ▶
+headers: HeaderBag #44 ▶
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: null
#pathInfo: "/xyz"
#requestUri: "/xyz?page=2"
#baseUrl: ""
#basePath: null
#method: "GET"
#format: null
#session: Store #112 ▶
#locale: null
#defaultLocale: "en"
-isForwardedValid: true
dd($request->all());
it is showing
array:1 [▼
"/xyz" => null
]
in the site which have error. but rest of the sites whose pagination working properly . gives the below output.
array:1 [▼
"page" => "2"
]
instead of #currentPage: 2 . it was working properly, But from yesterday it is happening like this through all our site. so how can I fix this?
Note: I have used this same code in multipage sites. but it is not working in it only
i got the proper issue here.In our whole site the passing to controller . and in validation . it is not mention how can i resolve this.
laravel pagination
laravel pagination
edited Mar 26 at 10:19
Biki mallik
asked Mar 26 at 6:28
Biki mallikBiki mallik
271 silver badge8 bronze badges
271 silver badge8 bronze badges
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37
|
show 10 more comments
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37
|
show 10 more comments
2 Answers
2
active
oldest
votes
Defected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
corrected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
add a comment |
I have tried your code, working fine for me. couldn't able to find out the problem with your code based on the information given. if it is not working, please set the currentPage manullay in you controller. so you controller would be like
public function getpages(Request $request)
Paginator::currentPageResolver(function() use ($request)
return $request->page;
);
$variable=Model::paginate(10);
dd($variable);
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you dodd($request->all())and post it.
– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you useduse IlluminatePaginationPaginator;in your controller
– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
|
show 9 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351010%2flaravel-unable-to-retrieve-the-correct-current-page-no-which-result-pagination%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Defected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
corrected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
add a comment |
Defected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
corrected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
add a comment |
Defected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
corrected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
Defected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
corrected htaccess file
RewriteEngine On
RewriteCond %HTTP:X-Forwarded-Proto !https
RewriteRule ^(.*)$ https://%HTTP_HOST/$1 [R=301,L]
RewriteEngine On
RewriteCond %HTTP_HOST !^www. [NC]
RewriteRule ^(.*)$ https://www.%HTTP_HOST/$1 [R=301,L]
#RewriteEngine On
#RewriteCond %REQUEST_FILENAME !-f
#RewriteCond %REQUEST_FILENAME !-d
#RewriteRule ^(.*)$ /index.php?/$1 [L]
#RewriteCond %THE_REQUEST ^.*/index.php
#RewriteRule ^(.*)index.php$ /$1 [R=301,L]
##Redirect 301 /index.php https://www.example.net/
#RewriteEngine On
#RewriteCond %HTTP:X-Forwarded-Proto !https [OR]
#RewriteCond %HTTP_HOST !^www. [NC]
#RewriteRule ^(.*)$ https://www.example.net/$1 [L,R=301]
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^api/(.*)?$ http://127.0.0.1:8888/$1 [P,L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %REQUEST_FILENAME !-d
RewriteCond %REQUEST_FILENAME !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %HTTP:Authorization .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%HTTP:Authorization]
</IfModule>
edited Mar 27 at 9:29
answered Mar 26 at 11:51
Biki mallikBiki mallik
271 silver badge8 bronze badges
271 silver badge8 bronze badges
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
add a comment |
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
Good. hope issues solved
– Sandeep Sudhakaran
Mar 26 at 12:05
add a comment |
I have tried your code, working fine for me. couldn't able to find out the problem with your code based on the information given. if it is not working, please set the currentPage manullay in you controller. so you controller would be like
public function getpages(Request $request)
Paginator::currentPageResolver(function() use ($request)
return $request->page;
);
$variable=Model::paginate(10);
dd($variable);
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you dodd($request->all())and post it.
– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you useduse IlluminatePaginationPaginator;in your controller
– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
|
show 9 more comments
I have tried your code, working fine for me. couldn't able to find out the problem with your code based on the information given. if it is not working, please set the currentPage manullay in you controller. so you controller would be like
public function getpages(Request $request)
Paginator::currentPageResolver(function() use ($request)
return $request->page;
);
$variable=Model::paginate(10);
dd($variable);
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you dodd($request->all())and post it.
– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you useduse IlluminatePaginationPaginator;in your controller
– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
|
show 9 more comments
I have tried your code, working fine for me. couldn't able to find out the problem with your code based on the information given. if it is not working, please set the currentPage manullay in you controller. so you controller would be like
public function getpages(Request $request)
Paginator::currentPageResolver(function() use ($request)
return $request->page;
);
$variable=Model::paginate(10);
dd($variable);
I have tried your code, working fine for me. couldn't able to find out the problem with your code based on the information given. if it is not working, please set the currentPage manullay in you controller. so you controller would be like
public function getpages(Request $request)
Paginator::currentPageResolver(function() use ($request)
return $request->page;
);
$variable=Model::paginate(10);
dd($variable);
answered Mar 26 at 7:09
Sandeep SudhakaranSandeep Sudhakaran
6341 silver badge13 bronze badges
6341 silver badge13 bronze badges
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you dodd($request->all())and post it.
– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you useduse IlluminatePaginationPaginator;in your controller
– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
|
show 9 more comments
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you dodd($request->all())and post it.
– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you useduse IlluminatePaginationPaginator;in your controller
– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
No changes in result.
– Biki mallik
Mar 26 at 7:29
No changes in result.
– Biki mallik
Mar 26 at 7:29
can you do
dd($request->all()) and post it.– Sandeep Sudhakaran
Mar 26 at 7:30
can you do
dd($request->all()) and post it.– Sandeep Sudhakaran
Mar 26 at 7:30
added in description
– Biki mallik
Mar 26 at 7:40
added in description
– Biki mallik
Mar 26 at 7:40
please make sure, you used
use IlluminatePaginationPaginator; in your controller– Sandeep Sudhakaran
Mar 26 at 7:51
please make sure, you used
use IlluminatePaginationPaginator; in your controller– Sandeep Sudhakaran
Mar 26 at 7:51
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
see the latest description ( mention in above for dd($request->all()) )
– Biki mallik
Mar 26 at 7:55
|
show 9 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351010%2flaravel-unable-to-retrieve-the-correct-current-page-no-which-result-pagination%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you show your code?
– Ajay Makwana
Mar 26 at 6:31
please add some more codes. what is $variable? how do you initializing it? please provide some more
– Sandeep Sudhakaran
Mar 26 at 6:31
wait i am adding to it
– Biki mallik
Mar 26 at 6:32
you can see the rest of the codes
– Biki mallik
Mar 26 at 6:34
can you show your route?
– Sandeep Sudhakaran
Mar 26 at 6:37