Skip to content

Instantly share code, notes, and snippets.

@filljoyner filljoyner/app.php
Last active Oct 11, 2018

Embed
What would you like to do?
Laravel - Change Public Directory
<?php
// Replace Application instance with below
// Override public directory with custom application instance
$app = new \App\Abilities\App\Application(
realpath(__DIR__.'/../')
);
<?php
namespace App\Abilities\App;
class Application extends \Illuminate\Foundation\Application
{
public function publicPath()
{
return $this->basePath.DIRECTORY_SEPARATOR.'content';
}
}
<?php
if ($uri !== '/' && file_exists(__DIR__.'/content'.$uri)) {
return false;
}
require_once __DIR__.'/content/index.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.