<?php require dirname(dirname(__DIR__)).'/bootstrap/autoload.php'; $app = require_once dirname(dirname(__DIR__)).'/bootstrap/app.php'; $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $request = Illuminate\Http\Request::capture(); $GLOBALS["test1"] = '123'; $GLOBALS["test2"] = array("ab"=>123, "cd"=>123434); $response = $kernel->handle( $request ); $mdt = $response->getContent(); echo $mdt;