Answer the question
In order to leave comments, you need to log in
Laravel 5.4 how to properly inject a dependency into a POST request?
For example, I have a form, it has a user_name field, I would not want to write this in the controller:
public function postDoSomething(Request $request)
{
//code...
$user = User::where('name', '=', $request->user_name)->first();
//code...
}
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