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;








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.










share|improve this question
























  • 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

















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.










share|improve this question
























  • 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













0












0








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












2 Answers
2






active

oldest

votes


















1














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>





share|improve this answer

























  • Good. hope issues solved

    – Sandeep Sudhakaran
    Mar 26 at 12:05


















0














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);






share|improve this answer























  • 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












  • 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











  • see the latest description ( mention in above for dd($request->all()) )

    – Biki mallik
    Mar 26 at 7:55













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
);



);













draft saved

draft discarded


















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









1














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>





share|improve this answer

























  • Good. hope issues solved

    – Sandeep Sudhakaran
    Mar 26 at 12:05















1














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>





share|improve this answer

























  • Good. hope issues solved

    – Sandeep Sudhakaran
    Mar 26 at 12:05













1












1








1







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>





share|improve this answer















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>






share|improve this answer














share|improve this answer



share|improve this answer








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

















  • 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













0














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);






share|improve this answer























  • 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












  • 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











  • see the latest description ( mention in above for dd($request->all()) )

    – Biki mallik
    Mar 26 at 7:55















0














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);






share|improve this answer























  • 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












  • 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











  • see the latest description ( mention in above for dd($request->all()) )

    – Biki mallik
    Mar 26 at 7:55













0












0








0







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);






share|improve this answer













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);







share|improve this answer












share|improve this answer



share|improve this answer










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 do dd($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 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

















  • 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












  • 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











  • 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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해