Route::currentRouteName() will return the route. Route::input() will return an array of route params
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
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
You can try this:
$query = $this->getQueryString();
See: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Http/Request.php#L109
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community