for some a reason I need to track entry point of laravel framework,how can I do that, is there any way to do that, I need to debug also how can laravel load service provider of package step by step is there any way or something like so, I ask just if can tell me how?
and what I mean by track?
I mean to display stack trace when laravel run, to see variables loaded into memory.
Advertisement
Answer
Entry point is ./public/index.php
. For debugging people usually use xdebug but I never really needed it. I usually just dd($something)
. If you have laravel 6 you have ddd()
helper that dumps the variable but also shows you the stack trace and other useful info. You can ddd()
directly in the ./vendor
in the provider if you want. Put any variables you want to see in the ddd
. If you don’t have laravel 6 then you can throw an exception to see the trace or dd()
whatever you want to see. There are other ways of course but this was always enough for me.