/** * Constructor. * * @param Application $app */ public function __construct(Application $app) { $this->app = $app; $this->httpKernel = $this->app->make('Illuminate\\Contracts\\Http\\Kernel'); $this->httpKernel->bootstrap(); $this->app->boot(); parent::__construct($this); }
/** * Constructor. * * @param Application $app */ public function __construct(Application $app) { $this->app = $app; $this->httpKernel = $this->app->make('Illuminate\\Contracts\\Http\\Kernel'); $this->httpKernel->bootstrap(); $this->app->boot(); $url = $this->app->config->get('app.url', 'http://localhost'); $this->app->instance('request', Request::createFromBase(SyfmonyRequest::create($url))); $components = parse_url($url); $host = isset($components['host']) ? $components['host'] : 'localhost'; parent::__construct($this, ['HTTP_HOST' => $host]); $this->followRedirects(true); // Parent constructor sets this to false by default }