I am trying to debug Laravel Envoy Blade file with @setup configuration block.
@setup
// some PHP config code here...
echo('Deploy started');
@endsetup
@servers(['web' => '-q -A ' . $sshOptions . ' "' . $server . '"', 'localhost' => '127.0.0.1'])
@task('deploy:setup', ['on' => 'web'])
// some deploy commands here...
@endtask
I've got "Whoops, looks like something went wrong" error message in the console. This message is not enough to understand what's wrong. I suppose there is a convenient way to debug Laravel envoy blade files line by line? To log something into the console?
As you can see nothing returned into the console despite echo exists in the @setup block of the Blade file
As far i have found a solution, it is dirty but i can check configuration variables throwing an error with some data i want to check :)
In your
@setup
section you could define functions to log different types of messages by setting bash colors. Make sure to return PHP code that can then be executed, not echo the message itself.In any Envoy task you could now do something like
to print out
Application deployed
in green text.If you simple want to output a message in your "standard" bash color use