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

Route::currentRouteName() will return the route. Route::input() will return an array of route params

0

vioza said:

Note: i know $_GET variables are bad to use but it''s a temp solution.

Thnx

$_GET variables are not bad if used correctly. I see get variables on fedex site often. But not good for secure data.
Looks like you are using method="POST". If using get variables probably should be method="GET". Need a route something like:

Route::get('owners', array('uses' => 'PownersController@ownerlist'));

And just get the data in controller like

$yourvar = $_GET['yourpassedgetvariable'];

And no a superglobal is not bad here, the data is seen anyway in the url.
However if POST data use the laravel:

$name = Request::input('name');//way of getting post vars
Last updated 9 years ago.
0

While reading the API documentation, you can also do the following:

$query = $request->query();

Documentation link: https://laravel.com/api/5.3/Illuminate/Http/Request.html#method_query

0

Sign in to participate in this thread!

Eventy

Your banner here too?

vioza vioza Joined 18 Feb 2015

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.