Last active
June 30, 2022 13:18
-
-
Save domthomas-dev/c92da79d4c6a517e105cea05dd7d1e0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function registerTestableLivewireMacro() | |
{ | |
TestableLivewire::macro('dumpLastErrorBag', function () { | |
dump($this->lastErrorBag); | |
return $this; | |
}); | |
if (function_exists('ray')) { | |
TestableLivewire::macro('ray', function () { | |
ray($this->dump()); | |
return $this; | |
}); | |
} | |
if (function_exists('ray')) { | |
TestableLivewire::macro('rayLastErrorBag', function () { | |
ray($this->lastErrorBag); | |
return $this; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use like this :
To see the current ErrorBag
To dump the component state but in ray
To see the current ErrorBag in ray