async icon indicating copy to clipboard operation
async copied to clipboard

Laravel $app returns true instead of Illuminate\Foundation\Application on production server inside a Task class

Open handhikadj opened this issue 6 months ago • 0 comments

I'm using cloudways and it's returning true which is wrong . on my local (mac), it's fine

class MyTask extends \Spatie\Async\Task
{
public function configure()
    {
        /** @var Application $app */

        require __DIR__ .'/../../vendor/autoload.php';
        $app = require_once __DIR__ .'/../../bootstrap/app.php'; // this returns true instead of instance of Application
        $kernel = $app->make(\Illuminate\Contracts\Http\Kernel::class);
        $kernel->handle(Request::capture());
    }
}

handhikadj avatar Aug 16 '24 12:08 handhikadj