Support the ongoing development of Laravel.io →
Requests Views Blade
Last updated 2 years ago.
0

Take a look at the helper functions, url and route, to make the urls.

https://laravel.com/docs/5.1/helpers#method-url or https://laravel.com/docs/5.1/helpers#method-route

0

How much values have you trying to pass on the $data array? Maybe we can find an alternate way to pass the values.

You're trying to pass an array through the GET method, remember that GET works like this:

-> http://www.yoursite.com/page.php?id=123&user=john

Where you are sending two variables through the url and can get the values like this:

echo $_GET['id']; // output 123

echo $_GET['user']; // output john

0

Right now I'm passing three pieces of information. However, eventually it will be more. Idk how many more pieces of info will need to be passed.

0
  • Based on that, you would need to encode your array to pass it on the url with http_build_query() php function it will generate a one line string that can be sent as variable containing all the items in your array. (you need to use this because via GET you can only send text and not structures)

http://php.net/manual/en/function.http-build-query.php

  • Then you can get your array back with parse_str() on your controller.

http://us1.php.net/manual/en/function.parse-str.php

Also check serialize() and unserialize() will work the same way. Remember that using GET it will display all the values sent in the URL so no privacy should be expected.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.