admin icon indicating copy to clipboard operation
admin copied to clipboard

Admin and Ajax

Open rakmaster opened this issue 9 years ago • 4 comments

I have a curious problem. I have created a custom edit page. On that page I have a series of drop-down (select) lists. The user must choose a value in the first list. This selection populates a set of values in the second list, based on that first selection. I am trying to use ajax to populate each successive list so I don't have to refresh the page every time a user makes a selection in one of the lists. The problem is that I keep getting an "unauthorized" from Laravel when I make a request, even if I send the token.

I have discovered that if I am logged in to both the web site and the admin the token works and everything processes just fine. However, if I'm just logged into the admin and not the web site, the request fails every time. How can I modify my requests, or my model(s) to fix this issue?

rakmaster avatar Sep 23 '15 20:09 rakmaster

@rakmaster hi, i have same problem, i need nested select. How resolve this?. Can you show me an example?. And while we go together the problem you have. Thanks!

mapeveri avatar Sep 25 '15 00:09 mapeveri

Same problem here. Anyone has got a solution?

ltomana avatar Nov 11 '16 10:11 ltomana

I had a similar problem, but now I am switching to the new admin version https://github.com/LaravelRUS/SleepingOwlAdmin

https://github.com/LaravelRUS/SleepingOwlAdmin/issues/69

s6carlo avatar Nov 11 '16 11:11 s6carlo

Thanks for quick response. I solved my issue just right now by giving up the ajax method. I need to modify one thing in older service so I cannot switch to newer version, but thank you anyway.

ltomana avatar Nov 11 '16 11:11 ltomana