1
Wenn ich die Routenliste von Befehlsform doc überprüfen:php Handwerker Route: Liste Runtime Session speichert nicht auf Anfrage gesetzt
php artisan route:list //RuntimeException: Session store not set on request.
Ich fand es sollte eine bessere Nutzung Helferfunktion session()
statt $request->session()
in Controller __contract
Funktion sein.
class SomeController extends Controller
{
public function __construct(Request $request)
{
//use $request->session()->has($var) will occur the exception as this post said.
if (session()->has($var)) {
//do something;
}
}
}
Formatierte in-line-Inhalt. – AlBlue