Skip to content

Tag: laravel

Remove A|B duplicates from associative array in Laravel

I have an associative array containing entries that are virtually the same, except the key-value pairs are swapped: I stored the array in a Laravel collection and tried using ->unique() but the output matches the array feeding in. How can I remove duplicates like this from an array so each pair is unique n…

Passing 2 parameters in ajax url in Laravel route

I need help, my ajax request doesn’t work if i use 2 parameters in url but if i only use 1 parameter it works perfectly fine. There isn’t error in the first one but i think it does not reach to the controller because the output in response is undefined. this is my view this is my ajax request when