Call to a member function getRouteParameters() on null