All request and dumps in laravel add a ^before a result, that's only do that in dd or dump
This effect generate a lot of errors on my code, someone past some like that?
One of the most popular way of debugging in PHP still remains the same – showing variables in the browser, with hope to find what the error is. Laravel has a specific short helper function for showing variables – dd() – stands for “Dump and Die”, but it’s not always convenient.
There is one problem with the accepted answer (and Laravel's Validator in general, in my opinion) - the validation process itself and validation status detection is merged into one method. If you blindly render all validation messages from the bag, it's no big deal.
But if you want the script to literally “dump one simple variable and die” – then dd ($var) is probably the fastest to type. Like our articles? Check out our Laravel online courses!
The laravel support helpers are loaded here. If the other helper functions are fine you can check the contents of laravel/framework/src/Illuminate/Support/helpers.php to see what's going on - this is where the function is created. I checked the dd function and it's the same as the source.
I had the same problem with laravel framework Lumen (5.8.12) and I solved the problem by returning to version 5.8.4.
The Origin of the problem seems to be the Symfony VarDumper Component (\vendor\symfony\var-dumper\Cloner\Data.php, line 302):
$dumper->dumpScalar($cursor, 'default', '^');
Should be:
$dumper->dumpScalar($cursor, 'default', '');
It is there for a useful reason. In terminal if you hover over the mouse on that ^
sign it will show you the file path from where this dump is coming from! I think it's really a useful thing but I don't see it working in browser. So, it should either be removed from borwser or fix the issue there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With