async
async copied to clipboard
Laravel $app returns true instead of Illuminate\Foundation\Application on production server inside a Task class
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());
}
}