Error: Call to undefined method Error::get(): Using $this when not in object context