Answer the question
In order to leave comments, you need to log in
$request->session()->flash() or Session::flash() or session()->flash(). What is more correct?
Is there a fundamental difference? Or is it a matter of taste?
Answer the question
In order to leave comments, you need to log in
That's right - do not use facades and magic helper functions that take the object of the request from the devil understand where. Such a short entry is given in the docks for clarity, while back in the 4th version, a convenient DI appeared that does not break IDE hints and does not crash the application when using reactphp.
Use $request->flash();
ps Looked at the doc https://laravel.com/docs/6.x/requests , none of the options you provided are there, where did you get them from?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question