Laravel Artisan Optimize Issue

Published

I have an odd situation happening when I use Laravel’s php optimize functionality.

$goodRequest = $requestValidator->validate($request->header('X-Twilio-Signature'), $request->fullUrl(), $requestData);

if(App::environment('prod')) {
    // Debuggin Information
    Log::info($request->header('X-Twilio-Signature'));
    Log::info(config("app.TWILIO_AUTH_TOKEN"));
    Log::info($request->fullUrl());
    Log::info(implode(" ", $requestData));
    Log::info($goodRequest);
}

When I don’t optimize, the $goodRequest variables get set correctly, however when I do optimize the application, $goodRequest becomes null.

Here is the sample output

[2021-08-21 10:25:25] prod.INFO: ABCDEFGHIJKLMNOP=
[2021-08-21 10:25:25] prod.INFO: 4328fsdh34820hfdj02384902fskj
[2021-08-21 10:25:25] prod.INFO: http://example.com/api
[2021-08-21 10:25:25] prod.INFO: US MA SMfc505a8dd5fbf47a87f62a565dae808f 0 BOSTON 11111 SMfc505a8dd5fbf47a87f62a565dae808f MA received BOSTON TEXT MA +111111111 11111 1 SMfc505a8dd5fbf47a87f62a565dae808f AC6236758eb7752b014afdf2f249d4121e +1111111111 2010-04-01
[2021-08-21 10:25:25] prod.INFO:

The last debug statement prints out the $goodRequest value and nothing gets set. Any thoughts?

Source: Laravel

Published
Categorised as laravel, twilio, twilio-php Tagged , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq