Fixing fatal error: "Uncaught exception 'RuntimeException' with message 'Accessed request service outside of request scope. "