diff --git a/.gitignore b/.gitignore index 1e12afe..5316e56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/vendor .env .env.* !.env.example diff --git a/Vagrantfile b/Vagrantfile index 3c8fb67..b3f9f81 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -60,7 +60,7 @@ composer_packages = [ # List any global Composer packages that you wa # Default web server document root # Symfony's public directory is assumed "web" # Laravel's public directory is assumed "public" -public_folder = "/vagrant/public" +public_folder = "/vagrant" laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here @@ -318,6 +318,6 @@ Vagrant.configure("2") do |config| # Any local scripts you may want to run post-provisioning. # Add these to the same directory as the Vagrantfile. ########## - config.vm.provision "shell", path: "./scripts/environment.sh", privileged: false + config.vm.provision "shell", path: "./system/vagrant/environment.sh", privileged: false end diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 38762f6..0000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,16 +0,0 @@ -make('Illuminate\Contracts\Console\Kernel'); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running. We will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ - -$kernel->terminate($input, $status); - -exit($status); diff --git a/public/flarum/.gitignore b/assets/.gitignore similarity index 100% rename from public/flarum/.gitignore rename to assets/.gitignore diff --git a/public/flarum/avatars/.gitignore b/assets/avatars/.gitignore similarity index 100% rename from public/flarum/avatars/.gitignore rename to assets/avatars/.gitignore diff --git a/bootstrap/app.php b/bootstrap/app.php deleted file mode 100644 index 7457353..0000000 --- a/bootstrap/app.php +++ /dev/null @@ -1,55 +0,0 @@ -singleton( - 'Illuminate\Contracts\Http\Kernel', - 'App\Http\Kernel' -); - -$app->singleton( - 'Illuminate\Contracts\Console\Kernel', - 'App\Console\Kernel' -); - -$app->singleton( - 'Illuminate\Contracts\Debug\ExceptionHandler', - 'Illuminate\Foundation\Exceptions\Handler' -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php deleted file mode 100644 index bc04666..0000000 --- a/bootstrap/autoload.php +++ /dev/null @@ -1,35 +0,0 @@ - [ + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'flarum', + 'username' => 'root', + 'password' => 'root', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + 'strict' => false + ] +]; diff --git a/core b/core deleted file mode 160000 index eef16ec..0000000 --- a/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eef16ec8cc36be8eabd89592b050c4531b42186c diff --git a/index.php b/index.php new file mode 100644 index 0000000..b60314d --- /dev/null +++ b/index.php @@ -0,0 +1,13 @@ +make('Illuminate\Contracts\Http\Kernel'); + +$response = $kernel->handle( + $request = Illuminate\Http\Request::capture() +); + +$response->send(); + +$kernel->terminate($request, $response); diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index 77827ae..0000000 --- a/public/.htaccess +++ /dev/null @@ -1,15 +0,0 @@ - - - Options -MultiViews - - - RewriteEngine On - - # Redirect Trailing Slashes... - RewriteRule ^(.*)/$ /$1 [L,R=301] - - # Handle Front Controller... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - diff --git a/public/index.php b/public/index.php deleted file mode 100644 index 05322e9..0000000 --- a/public/index.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ - -/* -|-------------------------------------------------------------------------- -| Register The Auto Loader -|-------------------------------------------------------------------------- -| -| Composer provides a convenient, automatically generated class loader for -| our application. We just need to utilize it! We'll simply require it -| into the script here so that we don't have to worry about manual -| loading any of our classes later on. It feels nice to relax. -| -*/ - -require __DIR__.'/../bootstrap/autoload.php'; - -/* -|-------------------------------------------------------------------------- -| Turn On The Lights -|-------------------------------------------------------------------------- -| -| We need to illuminate PHP development, so let us turn on the lights. -| This bootstraps the framework and gets it ready for use, then it -| will load up this application so that we can run it and send -| the responses back to the browser and delight our users. -| -*/ - -$app = require_once __DIR__.'/../bootstrap/app.php'; - -/* -|-------------------------------------------------------------------------- -| Run The Application -|-------------------------------------------------------------------------- -| -| Once we have the application, we can simply call the run method, -| which will execute the request and send the response back to -| the client's browser allowing them to enjoy the creative -| and wonderful application we have prepared for them. -| -*/ - -$kernel = $app->make('Illuminate\Contracts\Http\Kernel'); - -$response = $kernel->handle( - $request = Illuminate\Http\Request::capture() -); - -$response->send(); - -$kernel->terminate($request, $response); diff --git a/server.php b/server.php deleted file mode 100644 index 8f37587..0000000 --- a/server.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ - -$uri = urldecode( - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) -); - -// This file allows us to emulate Apache's "mod_rewrite" functionality from the -// built-in PHP web server. This provides a convenient way to test a Laravel -// application without having installed a "real" web server software here. -if ($uri !== '/' and file_exists(__DIR__.'/public'.$uri)) -{ - return false; -} - -require_once __DIR__.'/public/index.php'; diff --git a/.env.example b/system/.env.example similarity index 100% rename from .env.example rename to system/.env.example diff --git a/system/.gitignore b/system/.gitignore new file mode 100644 index 0000000..22d0d82 --- /dev/null +++ b/system/.gitignore @@ -0,0 +1 @@ +vendor diff --git a/system/artisan b/system/artisan new file mode 100644 index 0000000..567fbe7 --- /dev/null +++ b/system/artisan @@ -0,0 +1,15 @@ +#!/usr/bin/env php +make('Illuminate\Contracts\Console\Kernel'); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +$kernel->terminate($input, $status); + +exit($status); diff --git a/system/bootstrap.php b/system/bootstrap.php new file mode 100644 index 0000000..5c1d828 --- /dev/null +++ b/system/bootstrap.php @@ -0,0 +1,46 @@ +instance('path.public', __DIR__.'/..'); + +use Illuminate\Foundation\Http\Kernel as IlluminateHttpKernel; + +class HttpKernel extends IlluminateHttpKernel { + protected $middleware = [ + 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', + 'Illuminate\Cookie\Middleware\EncryptCookies', + 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', + 'Illuminate\Session\Middleware\StartSession', + 'Illuminate\View\Middleware\ShareErrorsFromSession', + // 'App\Http\Middleware\VerifyCsrfToken', + ]; + protected $routeMiddleware = []; +} + +use Illuminate\Foundation\Console\Kernel as IlluminateConsoleKernel; + +class ConsoleKernel extends IlluminateConsoleKernel { + protected $commands = []; +} + +$app->singleton( + 'Illuminate\Contracts\Http\Kernel', + 'HttpKernel' +); + +$app->singleton( + 'Illuminate\Contracts\Console\Kernel', + 'ConsoleKernel' +); + +$app->singleton( + 'Illuminate\Contracts\Debug\ExceptionHandler', + 'Illuminate\Foundation\Exceptions\Handler' +); + +return $app; diff --git a/composer.json b/system/composer.json similarity index 100% rename from composer.json rename to system/composer.json diff --git a/composer.lock b/system/composer.lock similarity index 100% rename from composer.lock rename to system/composer.lock diff --git a/config/app.php b/system/config/app.php similarity index 99% rename from config/app.php rename to system/config/app.php index 9428c29..2b6b2b7 100644 --- a/config/app.php +++ b/system/config/app.php @@ -136,6 +136,7 @@ return [ 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', + // 'Flarum\Support\Extensions\ExtensionsServiceProvider', 'Flarum\Core\CoreServiceProvider', 'Flarum\Api\ApiServiceProvider', 'Flarum\Forum\ForumServiceProvider', diff --git a/config/cache.php b/system/config/cache.php similarity index 100% rename from config/cache.php rename to system/config/cache.php diff --git a/config/compile.php b/system/config/compile.php similarity index 100% rename from config/compile.php rename to system/config/compile.php diff --git a/config/database.php b/system/config/database.php similarity index 100% rename from config/database.php rename to system/config/database.php diff --git a/config/filesystems.php b/system/config/filesystems.php similarity index 100% rename from config/filesystems.php rename to system/config/filesystems.php diff --git a/config/mail.php b/system/config/mail.php similarity index 98% rename from config/mail.php rename to system/config/mail.php index fc45943..499dce7 100644 --- a/config/mail.php +++ b/system/config/mail.php @@ -54,7 +54,7 @@ return [ | */ - 'from' => ['address' => null, 'name' => null], + 'from' => ['address' => 'noreply@localhost', 'name' => 'Flarum Demo Forum'], /* |-------------------------------------------------------------------------- diff --git a/config/queue.php b/system/config/queue.php similarity index 100% rename from config/queue.php rename to system/config/queue.php diff --git a/config/services.php b/system/config/services.php similarity index 100% rename from config/services.php rename to system/config/services.php diff --git a/config/session.php b/system/config/session.php similarity index 100% rename from config/session.php rename to system/config/session.php diff --git a/config/view.php b/system/config/view.php similarity index 100% rename from config/view.php rename to system/config/view.php diff --git a/storage/framework/sessions/.gitignore b/system/extensions/.gitignore similarity index 100% rename from storage/framework/sessions/.gitignore rename to system/extensions/.gitignore diff --git a/storage/.gitignore b/system/storage/.gitignore similarity index 100% rename from storage/.gitignore rename to system/storage/.gitignore diff --git a/storage/app/.gitignore b/system/storage/app/.gitignore similarity index 100% rename from storage/app/.gitignore rename to system/storage/app/.gitignore diff --git a/storage/framework/.gitignore b/system/storage/framework/.gitignore similarity index 100% rename from storage/framework/.gitignore rename to system/storage/framework/.gitignore diff --git a/storage/framework/cache/.gitignore b/system/storage/framework/cache/.gitignore similarity index 100% rename from storage/framework/cache/.gitignore rename to system/storage/framework/cache/.gitignore diff --git a/storage/framework/views/.gitignore b/system/storage/framework/sessions/.gitignore similarity index 100% rename from storage/framework/views/.gitignore rename to system/storage/framework/sessions/.gitignore diff --git a/storage/logs/.gitignore b/system/storage/framework/views/.gitignore similarity index 100% rename from storage/logs/.gitignore rename to system/storage/framework/views/.gitignore diff --git a/system/storage/less/.gitignore b/system/storage/less/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/system/storage/less/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/system/storage/logs/.gitignore b/system/storage/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/system/storage/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/studio.json b/system/studio.json similarity index 96% rename from studio.json rename to system/studio.json index a401666..14010d2 100644 --- a/studio.json +++ b/system/studio.json @@ -2,4 +2,4 @@ "packages": { "flarum/core": "core" } -} \ No newline at end of file +} diff --git a/scripts/aliases b/system/vagrant/aliases similarity index 100% rename from scripts/aliases rename to system/vagrant/aliases diff --git a/scripts/environment.sh b/system/vagrant/environment.sh similarity index 100% rename from scripts/environment.sh rename to system/vagrant/environment.sh