PHP Classes

File: .devcontainer/local-features/bootstrap-winter/codespaces.php

Recommend this page to a friend!
  Packages of Luke Towers   Winter   .devcontainer/local-features/bootstrap-winter/codespaces.php   Download  
File: .devcontainer/local-features/bootstrap-winter/codespaces.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Winter
Content management system that uses MVC
Author: By
Last change:
Date: 8 months ago
Size: 531 bytes
 

Contents

Class file image Download
<?php

$root
= dirname(__DIR__, 3);

require_once
$root . '/vendor/autoload.php';

use
Winter\LaravelConfigWriter\ArrayFile;
use
Winter\LaravelConfigWriter\EnvFile;

$config = ArrayFile::open($root . '/config/app.php');

$config->set('trustedHosts', [
   
'localhost',
   
'^(.+\.)?app.github.dev',
]);
$config->set('trustedProxies', '*');

$config->write();

$env = EnvFile::open($root . '/.env');

$env->set('APP_URL', 'https://' . $_ENV['CODESPACE_NAME'] . '.app.github.dev');
$env->set('LINK_POLICY', 'force');

$env->write();