View Single Post
  #4  
Old 11-08-2019, 05:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Redirecting a customer to a custom page after login, depending on parameter

Forget about \Doctrine\Common\Util\Debug::dump - it works but it is not pretty and messes up with the code. And you can't use "echo" unless you use "exit" after it as the execution continues after the echo and it is lost.


Install Symfony Dumper component - https://symfony.com/doc/current/components/var_dumper.html
- I would install it globally for your working environment that way you can use it every time for every project.

Then you can use



Code:
dump(Request);


to dump the request without interrupting the execution. You can also use



Code:
dd(Request);


which will dump the variable and exit. You can also use it within assigns as the dump function returns whatever you are dumping


Code:
$request = dump(Request);


$request will be assigned the value of Request and value will be dumped, that way you get to see what Request holds without stopping the normal execution of the process.


You can also use it in twig files...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote