binggle's avatar

Disappearing url query string

I am using laravel 8 , livewire 2.4

I used livewire pagination.

My situation is like this.

The 'page' variable is sent to 'show' page from 'index' page.

After clicking in 'index' page with 'page' variable, it goes to 'show' page with 'page' variable.

But in the 'show' page, the 'page' query-string is disappeared.

I made video, you can see what happens.

https://streamable.com/64m40n

I doubt if it is not cause of livewire. Because even though the Laravel pagination ( not livewire ) was tried, it show same results.

I guess it is about Navigation history ..

Is there someone have idea about this case?

0 likes
5 replies
bugsysha's avatar

That is a normal behaviour. Query param page has no use on the show page. It needs to be removed.

binggle's avatar

But I need the 'page' parameter.

It is being used for the same list with 'index' page under the content show section.

The problem is not about using 'page' variable in 'show' page.

My problem is that the 'page' query variable is missing.

Thanks.

bugsysha's avatar

What for are you using it? Video is not revealing everything so I don't understand how can you use something that feels unrelated. I'm probably missing some detail.

binggle's avatar

I am just building community site, something like reddit.

But Our country has something weird trend. it is pretty much old fashion.

Actually the almost our peoples are entrapped within that kinds of static, old, ugly patterns.

( List page - > View Page with List under Content section with pagination. )

They want list page kept even in View Page. They don't like to press go back button or menu button.

So I can say that our country peoples are sticking with nonsense way.

They want to see short-cut to another almost every page 'always', in every pages.

It is same with web sites.

That's why I need pass 'page' variable to View Page.

Anyway, my problem is not about livewire and nor laravel , I am sure now.

I am rebuilding my project again from the start.

I can not think another way out.

If I find the reason, I will post it here.

I really thank for your concern.

Please or to participate in this conversation.