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

your {home} param is not a query param. only query params can fetched with Input::get or Request::get

the path params are passed on to the controller method as method params.

Last updated 8 years ago.
0

Your method should look like this:

public function home(Request $request, $home) {
      return $home;
}

Last updated 8 years ago.
0

If you route is

Route::get('home/{home}', 'HomeController@home');

then your controller function home will be

public function home($variable)
{
    dd($variable
}

Meaning that if you access your site with home/hi+there you will see hi there as the variable's value.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

leo4all leo4all Joined 25 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.