Answer the question
In order to leave comments, you need to log in
What am I doing wrong with Lavarvel request?
1. Route
Route::get('/{lang?}', ['uses' => '[email protected]', 'as' => 'home']);
2. In the controller
use Illuminate\Support\Facades\Request;
public function Index(Request $request)
{
echo "lang = ".Request::input('lang');
}
As a result, an empty string is displayed. I guess that there is some kind of bug in the routing, but where exactly.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question