brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
319 stars 63 forks source link

App::runningInConsole() returning true on web function when octane is turned on #150

Open brain82 opened 8 months ago

brain82 commented 8 months ago

This appears to be because Octane runs using the PHP CLI (console).

As a quick fix, I've updated my function, as highlighted below. However, it will be great to have this as the default.

PS: Thanks for the great work!

image

mnapoli commented 8 months ago

Thanks for opening this, full context:

Screen-001523

We probably want this line in our Octane handler: https://github.com/laravel/octane/blob/2.x/bin/bootstrap.php#L8