diff --git a/app/commands/InspireCommand.php b/app/commands/InspireCommand.php new file mode 100644 index 00000000..4cbd600a --- /dev/null +++ b/app/commands/InspireCommand.php @@ -0,0 +1,43 @@ +comment('Inspiring Quote Here.'); + } + +} diff --git a/app/config/app.php b/app/config/app.php index 10ae94b7..cfce9019 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -95,6 +95,17 @@ 'providers' => array( + /* + * Application Service Providers... + */ + 'AppServiceProvider', + 'ArtisanServiceProvider', + 'ErrorServiceProvider', + 'LogServiceProvider', + + /* + * Laravel Framework Service Providers... + */ 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Cache\CacheServiceProvider', @@ -150,38 +161,37 @@ 'aliases' => array( - 'App' => 'Illuminate\Support\Facades\App', - 'Artisan' => 'Illuminate\Support\Facades\Artisan', - 'Auth' => 'Illuminate\Support\Facades\Auth', - 'Blade' => 'Illuminate\Support\Facades\Blade', - 'Cache' => 'Illuminate\Support\Facades\Cache', - 'ClassLoader' => 'Illuminate\Support\ClassLoader', - 'Config' => 'Illuminate\Support\Facades\Config', - 'Controller' => 'Illuminate\Routing\Controller', - 'Cookie' => 'Illuminate\Support\Facades\Cookie', - 'Crypt' => 'Illuminate\Support\Facades\Crypt', - 'DB' => 'Illuminate\Support\Facades\DB', - 'Eloquent' => 'Illuminate\Database\Eloquent\Model', - 'Event' => 'Illuminate\Support\Facades\Event', - 'File' => 'Illuminate\Support\Facades\File', - 'Form' => 'Illuminate\Support\Facades\Form', - 'Hash' => 'Illuminate\Support\Facades\Hash', - 'HTML' => 'Illuminate\Support\Facades\HTML', - 'Input' => 'Illuminate\Support\Facades\Input', - 'Lang' => 'Illuminate\Support\Facades\Lang', - 'Log' => 'Illuminate\Support\Facades\Log', - 'Mail' => 'Illuminate\Support\Facades\Mail', - 'Paginator' => 'Illuminate\Support\Facades\Paginator', - 'Password' => 'Illuminate\Support\Facades\Password', - 'Queue' => 'Illuminate\Support\Facades\Queue', - 'Redirect' => 'Illuminate\Support\Facades\Redirect', - 'Redis' => 'Illuminate\Support\Facades\Redis', - 'Request' => 'Illuminate\Support\Facades\Request', - 'Response' => 'Illuminate\Support\Facades\Response', - 'Route' => 'Illuminate\Support\Facades\Route', - 'Schema' => 'Illuminate\Support\Facades\Schema', - 'Seeder' => 'Illuminate\Database\Seeder', - 'Session' => 'Illuminate\Support\Facades\Session', + 'App' => 'Illuminate\Support\Facades\App', + 'Artisan' => 'Illuminate\Support\Facades\Artisan', + 'Auth' => 'Illuminate\Support\Facades\Auth', + 'Blade' => 'Illuminate\Support\Facades\Blade', + 'Cache' => 'Illuminate\Support\Facades\Cache', + 'Config' => 'Illuminate\Support\Facades\Config', + 'Controller' => 'Illuminate\Routing\Controller', + 'Cookie' => 'Illuminate\Support\Facades\Cookie', + 'Crypt' => 'Illuminate\Support\Facades\Crypt', + 'DB' => 'Illuminate\Support\Facades\DB', + 'Eloquent' => 'Illuminate\Database\Eloquent\Model', + 'Event' => 'Illuminate\Support\Facades\Event', + 'File' => 'Illuminate\Support\Facades\File', + 'Form' => 'Illuminate\Support\Facades\Form', + 'Hash' => 'Illuminate\Support\Facades\Hash', + 'HTML' => 'Illuminate\Support\Facades\HTML', + 'Input' => 'Illuminate\Support\Facades\Input', + 'Lang' => 'Illuminate\Support\Facades\Lang', + 'Log' => 'Illuminate\Support\Facades\Log', + 'Mail' => 'Illuminate\Support\Facades\Mail', + 'Paginator' => 'Illuminate\Support\Facades\Paginator', + 'Password' => 'Illuminate\Support\Facades\Password', + 'Queue' => 'Illuminate\Support\Facades\Queue', + 'Redirect' => 'Illuminate\Support\Facades\Redirect', + 'Redis' => 'Illuminate\Support\Facades\Redis', + 'Request' => 'Illuminate\Support\Facades\Request', + 'Response' => 'Illuminate\Support\Facades\Response', + 'Route' => 'Illuminate\Support\Facades\Route', + 'Schema' => 'Illuminate\Support\Facades\Schema', + 'Seeder' => 'Illuminate\Database\Seeder', + 'Session' => 'Illuminate\Support\Facades\Session', 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', diff --git a/app/config/compile.php b/app/config/compile.php index d5e55181..7f6d7b5f 100644 --- a/app/config/compile.php +++ b/app/config/compile.php @@ -13,6 +13,23 @@ | */ + 'files' => array( + // + ), + /* + |-------------------------------------------------------------------------- + | Compiled File Providers + |-------------------------------------------------------------------------- + | + | Here you may list service providers which define a "compiles" function + | that returns additional files that should be compiled, providing an + | easy way to get common files from any packages you are utilizing. + | + */ + + 'providers' => array( + // + ), ); diff --git a/app/config/database.php b/app/config/database.php index 3498fa81..552367c4 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -48,7 +48,7 @@ 'sqlite' => array( 'driver' => 'sqlite', - 'database' => __DIR__.'/../database/production.sqlite', + 'database' => storage_path().'/database.sqlite', 'prefix' => '', ), diff --git a/app/database/production.sqlite b/app/database/production.sqlite deleted file mode 100644 index e69de29b..00000000 diff --git a/app/filters.php b/app/routing/filters.php similarity index 96% rename from app/filters.php rename to app/routing/filters.php index fd0b4bcb..908b99ed 100644 --- a/app/filters.php +++ b/app/routing/filters.php @@ -13,7 +13,10 @@ App::before(function($request) { - // + if (App::isDownForMaintenance()) + { + return Response::make('Be right back!'); + } }); diff --git a/app/routes.php b/app/routing/routes.php similarity index 51% rename from app/routes.php rename to app/routing/routes.php index 3e10dcf5..e2591227 100644 --- a/app/routes.php +++ b/app/routing/routes.php @@ -1,5 +1,18 @@ registerInspireCommand(); + + $this->commands('commands.inspire'); + } + + /** + * Register the Inspire Artisan command. + * + * @return void + */ + protected function registerInspireCommand() + { + // Each available Artisan command must be registered with the console so + // that it is available to be called. We'll register every command so + // the console gets access to each of the command object instances. + $this->app->bindShared('commands.inspire', function() + { + return new InspireCommand; + }); + } + +} \ No newline at end of file diff --git a/app/src/Providers/ErrorServiceProvider.php b/app/src/Providers/ErrorServiceProvider.php new file mode 100644 index 00000000..af5464e4 --- /dev/null +++ b/app/src/Providers/ErrorServiceProvider.php @@ -0,0 +1,46 @@ +setupErrorHandlers(); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + // + } + + /** + * Setup the error handlers for the application. + * + * @return void + */ + protected function setupErrorHandlers() + { + // Here you may handle any errors that occur in your application, including + // logging them or displaying custom views for specific errors. You may + // even register several error handlers to handle different types of + // exceptions. If nothing is returned, the default error view is + // shown, which includes a detailed stack trace during debug. + + $this->app->error(function(Exception $exception, $code) + { + Log::error($exception); + }); + } + +} \ No newline at end of file diff --git a/app/src/Providers/LogServiceProvider.php b/app/src/Providers/LogServiceProvider.php new file mode 100644 index 00000000..3a0666a3 --- /dev/null +++ b/app/src/Providers/LogServiceProvider.php @@ -0,0 +1,41 @@ +setupLogging(); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + // + } + + /** + * Setup the logging facilities for the application. + * + * @return void + */ + protected function setupLogging() + { + // Here we will configure the error logger setup for the application which + // is built on top of the wonderful Monolog library. By default we will + // build a basic log file setup which creates a single file for logs. + + Log::useFiles(storage_path().'/logs/laravel.log'); + } + +} \ No newline at end of file diff --git a/app/models/User.php b/app/src/User.php similarity index 100% rename from app/models/User.php rename to app/src/User.php diff --git a/app/start/artisan.php b/app/start/artisan.php deleted file mode 100644 index 1df850bc..00000000 --- a/app/start/artisan.php +++ /dev/null @@ -1,13 +0,0 @@ -detectEnvironment([ + + 'local' => ['homestead'], + +]); diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 5a1f640b..27889875 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -52,6 +52,6 @@ | */ - 'storage' => __DIR__.'/../app/storage', + 'storage' => __DIR__.'/../storage', ); diff --git a/bootstrap/start.php b/bootstrap/start.php index 84559be3..949f2e5f 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -24,11 +24,7 @@ | */ -$env = $app->detectEnvironment(array( - - 'local' => array('homestead'), - -)); +require __DIR__.'/environment.php'; /* |-------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index 4f007693..5a0dbead 100644 --- a/composer.json +++ b/composer.json @@ -4,15 +4,15 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.2.*" + "laravel/framework": "4.3.*" }, "autoload": { "classmap": [ "app/commands", "app/controllers", - "app/models", "app/database/migrations", "app/database/seeds", + "app/src", "app/tests/TestCase.php" ] }, diff --git a/app/storage/.gitignore b/storage/.gitignore similarity index 100% rename from app/storage/.gitignore rename to storage/.gitignore diff --git a/app/storage/cache/.gitignore b/storage/cache/.gitignore similarity index 100% rename from app/storage/cache/.gitignore rename to storage/cache/.gitignore diff --git a/app/storage/logs/.gitignore b/storage/logs/.gitignore similarity index 100% rename from app/storage/logs/.gitignore rename to storage/logs/.gitignore diff --git a/app/storage/meta/.gitignore b/storage/meta/.gitignore similarity index 100% rename from app/storage/meta/.gitignore rename to storage/meta/.gitignore diff --git a/app/storage/sessions/.gitignore b/storage/sessions/.gitignore similarity index 100% rename from app/storage/sessions/.gitignore rename to storage/sessions/.gitignore diff --git a/app/storage/views/.gitignore b/storage/views/.gitignore similarity index 100% rename from app/storage/views/.gitignore rename to storage/views/.gitignore