From d2acaa24c2e1fef938a8c326907155695c43a9b0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 1 Jun 2014 13:16:51 -0500 Subject: [PATCH 01/82] Point at 4.3. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 158d9114b6e..365d444209d 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.2.*" + "laravel/framework": "4.3.*" }, "autoload": { "classmap": [ From e5fe0aff573bbfea42d8b4b0ad2c71b5aa0087ee Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 23 Jun 2014 21:22:55 -0500 Subject: [PATCH 02/82] Move the environment settings into their own file. --- bootstrap/environment.php | 18 ++++++++++++++++++ bootstrap/start.php | 6 +----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 bootstrap/environment.php diff --git a/bootstrap/environment.php b/bootstrap/environment.php new file mode 100644 index 00000000000..f133a3d9698 --- /dev/null +++ b/bootstrap/environment.php @@ -0,0 +1,18 @@ +detectEnvironment([ + + 'local' => ['homestead'], + +]); diff --git a/bootstrap/start.php b/bootstrap/start.php index 84559be3a45..949f2e5fdc3 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -24,11 +24,7 @@ | */ -$env = $app->detectEnvironment(array( - - 'local' => array('homestead'), - -)); +require __DIR__.'/environment.php'; /* |-------------------------------------------------------------------------- From 5b82dfb0ed840452fed5d900922ee686946c4120 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 18 Jul 2014 14:32:47 -0500 Subject: [PATCH 03/82] Working on compile config file. --- app/config/compile.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/config/compile.php b/app/config/compile.php index d5e55181b38..7f6d7b5f9e5 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( + // + ), ); From b20409fa53bb78251a507b4e6e2fdd87ab062c85 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 26 Jul 2014 22:00:01 -0500 Subject: [PATCH 04/82] Move storage out of app directory. --- app/database/production.sqlite | 0 bootstrap/paths.php | 2 +- {app/storage => storage}/.gitignore | 0 {app/storage => storage}/cache/.gitignore | 0 {app/storage => storage}/logs/.gitignore | 0 {app/storage => storage}/meta/.gitignore | 0 {app/storage => storage}/sessions/.gitignore | 0 {app/storage => storage}/views/.gitignore | 0 8 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 app/database/production.sqlite rename {app/storage => storage}/.gitignore (100%) rename {app/storage => storage}/cache/.gitignore (100%) rename {app/storage => storage}/logs/.gitignore (100%) rename {app/storage => storage}/meta/.gitignore (100%) rename {app/storage => storage}/sessions/.gitignore (100%) rename {app/storage => storage}/views/.gitignore (100%) diff --git a/app/database/production.sqlite b/app/database/production.sqlite deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 5a1f640ba44..278898757ab 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -52,6 +52,6 @@ | */ - 'storage' => __DIR__.'/../app/storage', + 'storage' => __DIR__.'/../storage', ); 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 From a8a0996faaab673c1ac9b6d375619298efb026af Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 26 Jul 2014 22:00:51 -0500 Subject: [PATCH 05/82] Tweak default SQLite database. --- app/config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/database.php b/app/config/database.php index 3498fa81948..552367c4159 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' => '', ), From 812532c68826eb3ea7863e8829e841c69f20707a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 27 Jul 2014 14:10:37 -0500 Subject: [PATCH 06/82] Rename commands directory. --- app/{commands => console}/.gitkeep | 0 app/start/global.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename app/{commands => console}/.gitkeep (100%) diff --git a/app/commands/.gitkeep b/app/console/.gitkeep similarity index 100% rename from app/commands/.gitkeep rename to app/console/.gitkeep diff --git a/app/start/global.php b/app/start/global.php index 82ab9ba4510..c12f33e5f12 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -13,7 +13,7 @@ ClassLoader::addDirectories(array( - app_path().'/commands', + app_path().'/console', app_path().'/controllers', app_path().'/models', app_path().'/database/seeds', From a5001352e645bbcb65be2be7b11371142c683918 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 29 Jul 2014 23:52:16 -0500 Subject: [PATCH 07/82] Fix autoload map. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 365d444209d..72e77469e13 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "autoload": { "classmap": [ - "app/commands", + "app/console", "app/controllers", "app/models", "app/database/migrations", From 0e0fd73b435d22aebb2efd2c42bf9df23d197b99 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 31 Jul 2014 15:13:50 -0500 Subject: [PATCH 08/82] Working on overall app structure. --- app/{console => commands}/.gitkeep | 0 app/commands/InspireCommand.php | 43 +++++++++++ app/config/app.php | 5 ++ app/{ => routing}/filters.php | 5 +- app/{ => routing}/routes.php | 13 ++++ app/src/Providers/AppServiceProvider.php | 27 +++++++ app/src/Providers/ArtisanServiceProvider.php | 45 +++++++++++ app/src/Providers/ErrorServiceProvider.php | 46 +++++++++++ app/src/Providers/LogServiceProvider.php | 41 ++++++++++ app/{models => src}/User.php | 0 app/start/artisan.php | 13 ---- app/start/global.php | 81 -------------------- app/start/local.php | 3 - bootstrap/autoload.php | 13 ---- composer.json | 4 +- 15 files changed, 226 insertions(+), 113 deletions(-) rename app/{console => commands}/.gitkeep (100%) create mode 100644 app/commands/InspireCommand.php rename app/{ => routing}/filters.php (96%) rename app/{ => routing}/routes.php (51%) create mode 100644 app/src/Providers/AppServiceProvider.php create mode 100644 app/src/Providers/ArtisanServiceProvider.php create mode 100644 app/src/Providers/ErrorServiceProvider.php create mode 100644 app/src/Providers/LogServiceProvider.php rename app/{models => src}/User.php (100%) delete mode 100644 app/start/artisan.php delete mode 100644 app/start/global.php delete mode 100644 app/start/local.php diff --git a/app/console/.gitkeep b/app/commands/.gitkeep similarity index 100% rename from app/console/.gitkeep rename to app/commands/.gitkeep diff --git a/app/commands/InspireCommand.php b/app/commands/InspireCommand.php new file mode 100644 index 00000000000..4cbd600a4ae --- /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 27665c60636..4e518901948 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -95,6 +95,11 @@ 'providers' => array( + 'AppServiceProvider', + 'ArtisanServiceProvider', + 'ErrorServiceProvider', + 'LogServiceProvider', + 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 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 fd0b4bcb6d2..908b99edfc0 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 3e10dcf56a2..e259122733e 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 00000000000..af5464e4bd4 --- /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 00000000000..3a0666a349f --- /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 1df850bc958..00000000000 --- a/app/start/artisan.php +++ /dev/null @@ -1,13 +0,0 @@ - Date: Thu, 31 Jul 2014 22:59:25 -0500 Subject: [PATCH 09/82] Continuing to work on structure. --- app/config/app.php | 6 ++++++ app/src/Providers/AppServiceProvider.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/app/config/app.php b/app/config/app.php index 4e518901948..eae5124c172 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -95,11 +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', diff --git a/app/src/Providers/AppServiceProvider.php b/app/src/Providers/AppServiceProvider.php index 608c50ad9b3..8a943c95de4 100644 --- a/app/src/Providers/AppServiceProvider.php +++ b/app/src/Providers/AppServiceProvider.php @@ -21,6 +21,10 @@ public function boot() */ public function register() { + // This service provider is a convenient place to register your services + // in the IoC container. If you wish, you may make additional methods + // or service providers to keep the code more focused and granular. + // } From c58286aa250d6fe0e347ddb1800f96e62e24de08 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 31 Jul 2014 23:41:39 -0500 Subject: [PATCH 10/82] Remove class loader from aliases. --- app/config/app.php | 1 - bootstrap/autoload.php | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/app/config/app.php b/app/config/app.php index eae5124c172..cc1bdace690 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -166,7 +166,6 @@ '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', diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 626612a2765..44c7dfa9ae0 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -32,19 +32,6 @@ require $compiled; } -/* -|-------------------------------------------------------------------------- -| Register The Laravel Auto Loader -|-------------------------------------------------------------------------- -| -| We register an auto-loader "behind" the Composer loader that can load -| model classes on the fly, even if the autoload files have not been -| regenerated for the application. We'll add it to the stack here. -| -*/ - -Illuminate\Support\ClassLoader::register(); - /* |-------------------------------------------------------------------------- | Register The Workbench Loaders From 1a0b1cc08e3dc4a919ea562b8be343b491a383a1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 1 Aug 2014 00:46:47 -0500 Subject: [PATCH 11/82] Work on inspiring command. --- app/commands/InspireCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/commands/InspireCommand.php b/app/commands/InspireCommand.php index 4cbd600a4ae..175a881c62b 100644 --- a/app/commands/InspireCommand.php +++ b/app/commands/InspireCommand.php @@ -1,6 +1,7 @@ comment('Inspiring Quote Here.'); + $this->comment(Inspiring::quote()); } } From 4b117a6ea8e1a2535ba0bb7e355b1ffca6575ddb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 1 Aug 2014 00:55:37 -0500 Subject: [PATCH 12/82] Fix a few things. --- app/commands/InspireCommand.php | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/commands/InspireCommand.php b/app/commands/InspireCommand.php index 175a881c62b..bdf720a091a 100644 --- a/app/commands/InspireCommand.php +++ b/app/commands/InspireCommand.php @@ -38,7 +38,7 @@ public function __construct() */ public function fire() { - $this->comment(Inspiring::quote()); + $this->info(Inspiring::quote()); } } diff --git a/composer.json b/composer.json index 5a0dbeadc89..b5d07e72c19 100644 --- a/composer.json +++ b/composer.json @@ -32,5 +32,5 @@ "config": { "preferred-install": "dist" }, - "minimum-stability": "stable" + "minimum-stability": "dev" } From 3a34a99694c68256be700fa7e6d7553ad9256994 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 1 Aug 2014 23:51:30 -0500 Subject: [PATCH 13/82] Working on default route setup. --- .gitignore | 1 + app/controllers/HomeController.php | 4 ++-- app/routing/routes.php | 7 ++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b5363f02031..6d67fa0646f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /bootstrap/compiled.php +/app/routing/cache.php /vendor composer.phar composer.lock diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index ede41a7a62e..a1b5890f45c 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -11,11 +11,11 @@ class HomeController extends BaseController { | based routes. That's great! Here is an example controller method to | get you started. To route to this controller, just add the route: | - | Route::get('/', 'HomeController@showWelcome'); + | Route::get('/', 'HomeController@index'); | */ - public function showWelcome() + public function index() { return View::make('hello'); } diff --git a/app/routing/routes.php b/app/routing/routes.php index e259122733e..8b5277a71d0 100644 --- a/app/routing/routes.php +++ b/app/routing/routes.php @@ -20,11 +20,8 @@ | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to -| and give it the Closure to execute when that URI is requested. +| then declare the method to execute when that URI is requested. | */ -Route::get('/', function() -{ - return View::make('hello'); -}); +Route::get('/', 'HomeController@index'); From e166aa5974d3bee1b2d7500297b1030e0adee5b3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 3 Aug 2014 14:06:00 -0500 Subject: [PATCH 14/82] Working on new provider and aliases. --- app/config/app.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/app.php b/app/config/app.php index cfce90195ff..0a5e64c45a8 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -116,6 +116,7 @@ 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', + 'Illuminate\Foundation\Providers\FormRequestServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Html\HtmlServiceProvider', 'Illuminate\Log\LogServiceProvider', @@ -175,6 +176,7 @@ 'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File', 'Form' => 'Illuminate\Support\Facades\Form', + 'FormRequest' => 'Illuminate\Foundation\Http\FormRequest', 'Hash' => 'Illuminate\Support\Facades\Hash', 'HTML' => 'Illuminate\Support\Facades\HTML', 'Input' => 'Illuminate\Support\Facades\Input', From 8aa4a0a6dc3a354626d51d9a27f24f60754aa815 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 3 Aug 2014 14:13:30 -0500 Subject: [PATCH 15/82] Adding requests directory. --- app/src/Requests/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/src/Requests/.gitkeep diff --git a/app/src/Requests/.gitkeep b/app/src/Requests/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d From 6070d93c4ace42843a68c8adb6c285fe526a4d8e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Aug 2014 10:13:20 -0500 Subject: [PATCH 16/82] Working on new directory structure. --- app/config/app.php | 13 ++- app/config/auth.php | 6 +- app/controllers/.gitkeep | 0 app/controllers/BaseController.php | 18 ---- app/routing/filters.php | 93 ------------------- app/routing/routes.php | 27 ------ app/src/{ => App}/User.php | 5 +- .../Console}/InspireCommand.php | 4 +- .../Http/Controllers}/HomeController.php | 2 +- app/src/Http/Filters/AuthFilter.php | 28 ++++++ app/src/Http/Filters/BasicAuthFilter.php | 15 +++ app/src/Http/Filters/CsrfFilter.php | 21 +++++ app/src/Http/Filters/GuestFilter.php | 18 ++++ app/src/Http/Filters/MaintenanceFilter.php | 18 ++++ app/{commands => src/Http/Requests}/.gitkeep | 0 app/src/Providers/AppServiceProvider.php | 2 +- app/src/Providers/ArtisanServiceProvider.php | 23 +---- app/src/Providers/ErrorServiceProvider.php | 32 +++---- app/src/Providers/FilterServiceProvider.php | 37 ++++++++ app/src/Providers/LogServiceProvider.php | 24 ++--- app/src/Providers/RouteServiceProvider.php | 29 ++++++ app/src/Requests/.gitkeep | 0 bootstrap/paths.php | 16 ++++ composer.json | 13 +-- public/index.php | 1 - 25 files changed, 225 insertions(+), 220 deletions(-) delete mode 100644 app/controllers/.gitkeep delete mode 100644 app/controllers/BaseController.php delete mode 100644 app/routing/filters.php delete mode 100644 app/routing/routes.php rename app/src/{ => App}/User.php (84%) rename app/{commands => src/Console}/InspireCommand.php (84%) rename app/{controllers => src/Http/Controllers}/HomeController.php (92%) create mode 100644 app/src/Http/Filters/AuthFilter.php create mode 100644 app/src/Http/Filters/BasicAuthFilter.php create mode 100644 app/src/Http/Filters/CsrfFilter.php create mode 100644 app/src/Http/Filters/GuestFilter.php create mode 100644 app/src/Http/Filters/MaintenanceFilter.php rename app/{commands => src/Http/Requests}/.gitkeep (100%) create mode 100644 app/src/Providers/FilterServiceProvider.php create mode 100644 app/src/Providers/RouteServiceProvider.php delete mode 100644 app/src/Requests/.gitkeep diff --git a/app/config/app.php b/app/config/app.php index 0a5e64c45a8..3e254981e4a 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -98,10 +98,12 @@ /* * Application Service Providers... */ - 'AppServiceProvider', - 'ArtisanServiceProvider', - 'ErrorServiceProvider', - 'LogServiceProvider', + 'Providers\AppServiceProvider', + 'Providers\ArtisanServiceProvider', + 'Providers\ErrorServiceProvider', + 'Providers\FilterServiceProvider', + 'Providers\LogServiceProvider', + 'Providers\RouteServiceProvider', /* * Laravel Framework Service Providers... @@ -109,9 +111,7 @@ 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Cache\CacheServiceProvider', - 'Illuminate\Session\CommandsServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', - 'Illuminate\Routing\ControllerServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', @@ -132,7 +132,6 @@ 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', - 'Illuminate\Workbench\WorkbenchServiceProvider', ), diff --git a/app/config/auth.php b/app/config/auth.php index eacbbfaedd7..967e0e258d0 100644 --- a/app/config/auth.php +++ b/app/config/auth.php @@ -28,7 +28,7 @@ | */ - 'model' => 'User', + 'model' => 'App\User', /* |-------------------------------------------------------------------------- @@ -59,13 +59,9 @@ */ 'reminder' => array( - 'email' => 'emails.auth.reminder', - 'table' => 'password_reminders', - 'expire' => 60, - ), ); diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php deleted file mode 100644 index 2bee4644a0d..00000000000 --- a/app/controllers/BaseController.php +++ /dev/null @@ -1,18 +0,0 @@ -layout)) - { - $this->layout = View::make($this->layout); - } - } - -} diff --git a/app/routing/filters.php b/app/routing/filters.php deleted file mode 100644 index 908b99edfc0..00000000000 --- a/app/routing/filters.php +++ /dev/null @@ -1,93 +0,0 @@ -info(Inspiring::quote()); + $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL); } } diff --git a/app/controllers/HomeController.php b/app/src/Http/Controllers/HomeController.php similarity index 92% rename from app/controllers/HomeController.php rename to app/src/Http/Controllers/HomeController.php index a1b5890f45c..c634d2d904d 100644 --- a/app/controllers/HomeController.php +++ b/app/src/Http/Controllers/HomeController.php @@ -1,6 +1,6 @@ ajax()) + { + return Response::make('Unauthorized', 401); + } + else + { + return Redirect::guest('login'); + } + } + } + +} \ No newline at end of file diff --git a/app/src/Http/Filters/BasicAuthFilter.php b/app/src/Http/Filters/BasicAuthFilter.php new file mode 100644 index 00000000000..49316e2b3eb --- /dev/null +++ b/app/src/Http/Filters/BasicAuthFilter.php @@ -0,0 +1,15 @@ +input('_token')) + { + throw new Illuminate\Session\TokenMismatchException; + } + } + +} \ No newline at end of file diff --git a/app/src/Http/Filters/GuestFilter.php b/app/src/Http/Filters/GuestFilter.php new file mode 100644 index 00000000000..08cee12bb98 --- /dev/null +++ b/app/src/Http/Filters/GuestFilter.php @@ -0,0 +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; - }); + $this->commands('InspireCommand'); } } \ No newline at end of file diff --git a/app/src/Providers/ErrorServiceProvider.php b/app/src/Providers/ErrorServiceProvider.php index af5464e4bd4..9ed40612778 100644 --- a/app/src/Providers/ErrorServiceProvider.php +++ b/app/src/Providers/ErrorServiceProvider.php @@ -1,4 +1,4 @@ -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) + { + $this->app['log']->error($exception); + }); } /** @@ -24,23 +33,4 @@ 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/FilterServiceProvider.php b/app/src/Providers/FilterServiceProvider.php new file mode 100644 index 00000000000..be0d7d8c7d2 --- /dev/null +++ b/app/src/Providers/FilterServiceProvider.php @@ -0,0 +1,37 @@ + 'AuthFilter', + 'auth.basic' => 'BasicAuthFilter', + 'csrf' => 'CsrfFilter', + 'guest' => 'GuestFilter', + ]; + +} \ No newline at end of file diff --git a/app/src/Providers/LogServiceProvider.php b/app/src/Providers/LogServiceProvider.php index 3a0666a349f..c9af5d7e1bb 100644 --- a/app/src/Providers/LogServiceProvider.php +++ b/app/src/Providers/LogServiceProvider.php @@ -1,4 +1,4 @@ -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. + + $this->app['log']->useFiles( + storage_path().'/logs/laravel.log' + ); } /** @@ -24,18 +30,4 @@ 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/src/Providers/RouteServiceProvider.php b/app/src/Providers/RouteServiceProvider.php new file mode 100644 index 00000000000..b76e26dfa1c --- /dev/null +++ b/app/src/Providers/RouteServiceProvider.php @@ -0,0 +1,29 @@ +get('/', 'HomeController@index'); + } + +} \ No newline at end of file diff --git a/app/src/Requests/.gitkeep b/app/src/Requests/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 278898757ab..615713df833 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -54,4 +54,20 @@ 'storage' => __DIR__.'/../storage', + /* + |-------------------------------------------------------------------------- + | Generator Paths + |-------------------------------------------------------------------------- + | + | These paths are used by the various class generators and other pieces + | of the framework that need to determine where to store these types + | of classes. Of course, they may be changed to any path you wish. + | + */ + + 'commands' => __DIR__.'/../app/src/Console', + 'controllers' => __DIR__.'/../app/src/Http/Controllers', + 'filters' => __DIR__.'/../app/src/Http/Filters', + 'requests' => __DIR__.'/../app/src/Http/Requests', + ); diff --git a/composer.json b/composer.json index b5d07e72c19..57f80ae7aea 100644 --- a/composer.json +++ b/composer.json @@ -4,17 +4,18 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.3.*" + "laravel/framework": "4.3.*", + "andrewsville/php-token-reflection": "~1.4" }, "autoload": { "classmap": [ - "app/commands", - "app/controllers", - "app/database/migrations", - "app/database/seeds", + "app/database", "app/src", "app/tests/TestCase.php" - ] + ], + "psr-4": { + "App\\": "app/src/App/" + } }, "scripts": { "post-install-cmd": [ diff --git a/public/index.php b/public/index.php index f08822d9536..6da55083d3d 100644 --- a/public/index.php +++ b/public/index.php @@ -45,5 +45,4 @@ | and wonderful application we have whipped up for them. | */ - $app->run(); From 727d097a5bc8d65ee4bd22758834b2a9b3385c48 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Aug 2014 10:42:42 -0500 Subject: [PATCH 17/82] Remove accidental dependency. --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 57f80ae7aea..5c545a3940e 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,7 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.3.*", - "andrewsville/php-token-reflection": "~1.4" + "laravel/framework": "4.3.*" }, "autoload": { "classmap": [ From 084a91cf7c6a95222f3b0051361dd4245cf42283 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Aug 2014 13:36:28 -0500 Subject: [PATCH 18/82] Add src path. --- bootstrap/paths.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 615713df833..6464e13d1ba 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -69,5 +69,6 @@ 'controllers' => __DIR__.'/../app/src/Http/Controllers', 'filters' => __DIR__.'/../app/src/Http/Filters', 'requests' => __DIR__.'/../app/src/Http/Requests', + 'src' => __DIR__.'/../app/src', ); From 00099ae56c183ffa834bdc8a2b20deeb8b91a7af Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Aug 2014 16:13:43 -0500 Subject: [PATCH 19/82] Working on directory structure. Event provider. --- app/config/app.php | 1 + app/src/Providers/EventServiceProvider.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 app/src/Providers/EventServiceProvider.php diff --git a/app/config/app.php b/app/config/app.php index 3e254981e4a..230e3d87f73 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -101,6 +101,7 @@ 'Providers\AppServiceProvider', 'Providers\ArtisanServiceProvider', 'Providers\ErrorServiceProvider', + 'Providers\EventServiceProvider', 'Providers\FilterServiceProvider', 'Providers\LogServiceProvider', 'Providers\RouteServiceProvider', diff --git a/app/src/Providers/EventServiceProvider.php b/app/src/Providers/EventServiceProvider.php new file mode 100644 index 00000000000..c01ed9a52ff --- /dev/null +++ b/app/src/Providers/EventServiceProvider.php @@ -0,0 +1,19 @@ + Date: Tue, 12 Aug 2014 07:01:09 -0500 Subject: [PATCH 20/82] Rename core directory. --- app/src/{App => Core}/User.php | 0 composer.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename app/src/{App => Core}/User.php (100%) diff --git a/app/src/App/User.php b/app/src/Core/User.php similarity index 100% rename from app/src/App/User.php rename to app/src/Core/User.php diff --git a/composer.json b/composer.json index 5c545a3940e..db5c7cf4e39 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "app/tests/TestCase.php" ], "psr-4": { - "App\\": "app/src/App/" + "App\\": "app/src/Core/" } }, "scripts": { From 1e8ed2cdcc2cb7adbabfe66ef7b25f3a1731cc15 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 12 Aug 2014 11:58:09 -0500 Subject: [PATCH 21/82] Make a few tweaks to providers. --- app/src/Providers/AppServiceProvider.php | 2 +- app/src/Providers/ArtisanServiceProvider.php | 10 ---------- app/src/Providers/ErrorServiceProvider.php | 2 +- app/src/Providers/EventServiceProvider.php | 10 ++++++++++ app/src/Providers/LogServiceProvider.php | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/Providers/AppServiceProvider.php b/app/src/Providers/AppServiceProvider.php index 63d62880881..3a511f38fdd 100644 --- a/app/src/Providers/AppServiceProvider.php +++ b/app/src/Providers/AppServiceProvider.php @@ -5,7 +5,7 @@ class AppServiceProvider extends ServiceProvider { /** - * Bootstrap the application events. + * Bootstrap any necessary services. * * @return void */ diff --git a/app/src/Providers/ArtisanServiceProvider.php b/app/src/Providers/ArtisanServiceProvider.php index 3db3c109bbf..e4438ab59bd 100644 --- a/app/src/Providers/ArtisanServiceProvider.php +++ b/app/src/Providers/ArtisanServiceProvider.php @@ -5,16 +5,6 @@ class ArtisanServiceProvider extends ServiceProvider { - /** - * Bootstrap the application events. - * - * @return void - */ - public function boot() - { - // - } - /** * Register the service provider. * diff --git a/app/src/Providers/ErrorServiceProvider.php b/app/src/Providers/ErrorServiceProvider.php index 9ed40612778..ad132c0da95 100644 --- a/app/src/Providers/ErrorServiceProvider.php +++ b/app/src/Providers/ErrorServiceProvider.php @@ -5,7 +5,7 @@ class ErrorServiceProvider extends ServiceProvider { /** - * Bootstrap the application events. + * Register any error handlers. * * @return void */ diff --git a/app/src/Providers/EventServiceProvider.php b/app/src/Providers/EventServiceProvider.php index c01ed9a52ff..a7a76cf13d7 100644 --- a/app/src/Providers/EventServiceProvider.php +++ b/app/src/Providers/EventServiceProvider.php @@ -4,6 +4,16 @@ class EventServiceProvider extends ServiceProvider { + /** + * Bootstrap the application events. + * + * @return void + */ + public function boot() + { + // + } + /** * Get the directories to scan for events. * diff --git a/app/src/Providers/LogServiceProvider.php b/app/src/Providers/LogServiceProvider.php index c9af5d7e1bb..a1fb8f2d726 100644 --- a/app/src/Providers/LogServiceProvider.php +++ b/app/src/Providers/LogServiceProvider.php @@ -5,7 +5,7 @@ class LogServiceProvider extends ServiceProvider { /** - * Bootstrap the application events. + * Configure the application's logging facilities. * * @return void */ From 2effec9c11897896f9ed960be0e927782e640508 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 12 Aug 2014 15:13:57 -0500 Subject: [PATCH 22/82] Update the GitIgnore file. --- storage/meta/.gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/meta/.gitignore b/storage/meta/.gitignore index c96a04f008e..e2ed1a67814 100644 --- a/storage/meta/.gitignore +++ b/storage/meta/.gitignore @@ -1,2 +1,3 @@ -* -!.gitignore \ No newline at end of file +services.json +routes.php +services.php From b0334fd4de2a9199fb8971a8bfca93fd1f12093e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 12 Aug 2014 16:18:11 -0500 Subject: [PATCH 23/82] Use a standard routes file by default. --- app/src/Http/routes.php | 14 ++++++++++++++ app/src/Providers/RouteServiceProvider.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 app/src/Http/routes.php diff --git a/app/src/Http/routes.php b/app/src/Http/routes.php new file mode 100644 index 00000000000..60dfce5009c --- /dev/null +++ b/app/src/Http/routes.php @@ -0,0 +1,14 @@ +get('/', 'HomeController@index'); + require app_path().'/src/Http/routes.php'; } } \ No newline at end of file From c33453e97f93a7ed0eb019e86ae8bedf9ddff9e3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 12 Aug 2014 16:21:45 -0500 Subject: [PATCH 24/82] Pull routes after booting application. --- app/src/Providers/RouteServiceProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/Providers/RouteServiceProvider.php b/app/src/Providers/RouteServiceProvider.php index 8ceec856d4d..50a40b3ab2c 100644 --- a/app/src/Providers/RouteServiceProvider.php +++ b/app/src/Providers/RouteServiceProvider.php @@ -23,7 +23,10 @@ public function before() */ public function map() { - require app_path().'/src/Http/routes.php'; + $this->app->booted(function() + { + require app('path.src').'/Http/routes.php'; + }); } } \ No newline at end of file From 262dec16f8ee095d12ef10f94e85e442c04e5db2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Aug 2014 09:30:14 -0500 Subject: [PATCH 25/82] Add more paths. --- bootstrap/paths.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 6464e13d1ba..717ac1b1dc3 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -66,8 +66,11 @@ */ 'commands' => __DIR__.'/../app/src/Console', + 'config' => __DIR__.'/../app/config', 'controllers' => __DIR__.'/../app/src/Http/Controllers', + 'database' => __DIR__.'/../app/database', 'filters' => __DIR__.'/../app/src/Http/Filters', + 'lang' => __DIR__.'/../app/lang', 'requests' => __DIR__.'/../app/src/Http/Requests', 'src' => __DIR__.'/../app/src', From ee6f47dc47ad6ba8dd438c86c0ca130d6e8efbb4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Aug 2014 09:44:20 -0500 Subject: [PATCH 26/82] Working on app structure. --- app/{src/Console => console}/InspireCommand.php | 0 app/{src/Core => core}/User.php | 0 .../Controllers => http/controllers}/HomeController.php | 0 app/{src/Http/Filters => http/filters}/AuthFilter.php | 0 .../Http/Filters => http/filters}/BasicAuthFilter.php | 0 app/{src/Http/Filters => http/filters}/CsrfFilter.php | 0 app/{src/Http/Filters => http/filters}/GuestFilter.php | 0 .../Http/Filters => http/filters}/MaintenanceFilter.php | 0 app/{src/Http/Requests => http/requests}/.gitkeep | 0 app/{src/Providers => providers}/AppServiceProvider.php | 0 .../Providers => providers}/ArtisanServiceProvider.php | 0 app/{src/Providers => providers}/ErrorServiceProvider.php | 0 app/{src/Providers => providers}/EventServiceProvider.php | 0 .../Providers => providers}/FilterServiceProvider.php | 0 app/{src/Providers => providers}/LogServiceProvider.php | 0 app/{src/Providers => providers}/RouteServiceProvider.php | 2 +- app/{src/Http => }/routes.php | 0 bootstrap/paths.php | 8 ++++---- composer.json | 5 +++-- 19 files changed, 8 insertions(+), 7 deletions(-) rename app/{src/Console => console}/InspireCommand.php (100%) rename app/{src/Core => core}/User.php (100%) rename app/{src/Http/Controllers => http/controllers}/HomeController.php (100%) rename app/{src/Http/Filters => http/filters}/AuthFilter.php (100%) rename app/{src/Http/Filters => http/filters}/BasicAuthFilter.php (100%) rename app/{src/Http/Filters => http/filters}/CsrfFilter.php (100%) rename app/{src/Http/Filters => http/filters}/GuestFilter.php (100%) rename app/{src/Http/Filters => http/filters}/MaintenanceFilter.php (100%) rename app/{src/Http/Requests => http/requests}/.gitkeep (100%) rename app/{src/Providers => providers}/AppServiceProvider.php (100%) rename app/{src/Providers => providers}/ArtisanServiceProvider.php (100%) rename app/{src/Providers => providers}/ErrorServiceProvider.php (100%) rename app/{src/Providers => providers}/EventServiceProvider.php (100%) rename app/{src/Providers => providers}/FilterServiceProvider.php (100%) rename app/{src/Providers => providers}/LogServiceProvider.php (100%) rename app/{src/Providers => providers}/RouteServiceProvider.php (90%) rename app/{src/Http => }/routes.php (100%) diff --git a/app/src/Console/InspireCommand.php b/app/console/InspireCommand.php similarity index 100% rename from app/src/Console/InspireCommand.php rename to app/console/InspireCommand.php diff --git a/app/src/Core/User.php b/app/core/User.php similarity index 100% rename from app/src/Core/User.php rename to app/core/User.php diff --git a/app/src/Http/Controllers/HomeController.php b/app/http/controllers/HomeController.php similarity index 100% rename from app/src/Http/Controllers/HomeController.php rename to app/http/controllers/HomeController.php diff --git a/app/src/Http/Filters/AuthFilter.php b/app/http/filters/AuthFilter.php similarity index 100% rename from app/src/Http/Filters/AuthFilter.php rename to app/http/filters/AuthFilter.php diff --git a/app/src/Http/Filters/BasicAuthFilter.php b/app/http/filters/BasicAuthFilter.php similarity index 100% rename from app/src/Http/Filters/BasicAuthFilter.php rename to app/http/filters/BasicAuthFilter.php diff --git a/app/src/Http/Filters/CsrfFilter.php b/app/http/filters/CsrfFilter.php similarity index 100% rename from app/src/Http/Filters/CsrfFilter.php rename to app/http/filters/CsrfFilter.php diff --git a/app/src/Http/Filters/GuestFilter.php b/app/http/filters/GuestFilter.php similarity index 100% rename from app/src/Http/Filters/GuestFilter.php rename to app/http/filters/GuestFilter.php diff --git a/app/src/Http/Filters/MaintenanceFilter.php b/app/http/filters/MaintenanceFilter.php similarity index 100% rename from app/src/Http/Filters/MaintenanceFilter.php rename to app/http/filters/MaintenanceFilter.php diff --git a/app/src/Http/Requests/.gitkeep b/app/http/requests/.gitkeep similarity index 100% rename from app/src/Http/Requests/.gitkeep rename to app/http/requests/.gitkeep diff --git a/app/src/Providers/AppServiceProvider.php b/app/providers/AppServiceProvider.php similarity index 100% rename from app/src/Providers/AppServiceProvider.php rename to app/providers/AppServiceProvider.php diff --git a/app/src/Providers/ArtisanServiceProvider.php b/app/providers/ArtisanServiceProvider.php similarity index 100% rename from app/src/Providers/ArtisanServiceProvider.php rename to app/providers/ArtisanServiceProvider.php diff --git a/app/src/Providers/ErrorServiceProvider.php b/app/providers/ErrorServiceProvider.php similarity index 100% rename from app/src/Providers/ErrorServiceProvider.php rename to app/providers/ErrorServiceProvider.php diff --git a/app/src/Providers/EventServiceProvider.php b/app/providers/EventServiceProvider.php similarity index 100% rename from app/src/Providers/EventServiceProvider.php rename to app/providers/EventServiceProvider.php diff --git a/app/src/Providers/FilterServiceProvider.php b/app/providers/FilterServiceProvider.php similarity index 100% rename from app/src/Providers/FilterServiceProvider.php rename to app/providers/FilterServiceProvider.php diff --git a/app/src/Providers/LogServiceProvider.php b/app/providers/LogServiceProvider.php similarity index 100% rename from app/src/Providers/LogServiceProvider.php rename to app/providers/LogServiceProvider.php diff --git a/app/src/Providers/RouteServiceProvider.php b/app/providers/RouteServiceProvider.php similarity index 90% rename from app/src/Providers/RouteServiceProvider.php rename to app/providers/RouteServiceProvider.php index 50a40b3ab2c..35621d209e1 100644 --- a/app/src/Providers/RouteServiceProvider.php +++ b/app/providers/RouteServiceProvider.php @@ -25,7 +25,7 @@ public function map() { $this->app->booted(function() { - require app('path.src').'/Http/routes.php'; + require app('path').'/routes.php'; }); } diff --git a/app/src/Http/routes.php b/app/routes.php similarity index 100% rename from app/src/Http/routes.php rename to app/routes.php diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 717ac1b1dc3..277ecf7a6c5 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -65,13 +65,13 @@ | */ - 'commands' => __DIR__.'/../app/src/Console', + 'commands' => __DIR__.'/../app/console', 'config' => __DIR__.'/../app/config', - 'controllers' => __DIR__.'/../app/src/Http/Controllers', + 'controllers' => __DIR__.'/../app/http/controllers', 'database' => __DIR__.'/../app/database', - 'filters' => __DIR__.'/../app/src/Http/Filters', + 'filters' => __DIR__.'/../app/http/filters', 'lang' => __DIR__.'/../app/lang', - 'requests' => __DIR__.'/../app/src/Http/Requests', + 'requests' => __DIR__.'/../app/http/requests', 'src' => __DIR__.'/../app/src', ); diff --git a/composer.json b/composer.json index db5c7cf4e39..9e9a6129570 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,12 @@ "autoload": { "classmap": [ "app/database", - "app/src", + "app/http", "app/tests/TestCase.php" ], "psr-4": { - "App\\": "app/src/Core/" + "App\\": "app/src/core/", + "Providers\\": "app/providers/" } }, "scripts": { From 2649df12ca1cd57cee3ba8ed3a0d2e0342a195f2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Aug 2014 09:44:35 -0500 Subject: [PATCH 27/82] Unused path. --- bootstrap/paths.php | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 277ecf7a6c5..df0104798f2 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -72,6 +72,5 @@ 'filters' => __DIR__.'/../app/http/filters', 'lang' => __DIR__.'/../app/lang', 'requests' => __DIR__.'/../app/http/requests', - 'src' => __DIR__.'/../app/src', ); From 278758542cd67090c3b23763471a51a18e7e055a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Aug 2014 10:00:36 -0500 Subject: [PATCH 28/82] Namespace change. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9e9a6129570..e005b21b0e2 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "app/tests/TestCase.php" ], "psr-4": { - "App\\": "app/src/core/", + "App\\": "app/core/", "Providers\\": "app/providers/" } }, From a5f4e74889f62fa4ebefb352ab39c70f58f038ca Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 13 Aug 2014 10:01:57 -0500 Subject: [PATCH 29/82] Autoload the console. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index e005b21b0e2..cdd53d7ba4a 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,7 @@ }, "autoload": { "classmap": [ + "app/console", "app/database", "app/http", "app/tests/TestCase.php" From da93563ad74c93ddbacd042ea49c995b0e8eb72c Mon Sep 17 00:00:00 2001 From: crynobone Date: Sun, 17 Aug 2014 19:32:08 +0800 Subject: [PATCH 30/82] Remove none existing files being referred in .gitignore Signed-off-by: crynobone --- .gitignore | 1 - storage/.gitignore | 1 - 2 files changed, 2 deletions(-) delete mode 100644 storage/.gitignore diff --git a/.gitignore b/.gitignore index 6d67fa0646f..b5363f02031 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /bootstrap/compiled.php -/app/routing/cache.php /vendor composer.phar composer.lock diff --git a/storage/.gitignore b/storage/.gitignore deleted file mode 100644 index 35b719c69a0..00000000000 --- a/storage/.gitignore +++ /dev/null @@ -1 +0,0 @@ -services.manifest \ No newline at end of file From 9aae50e5017e3063bc3f53e9ecbfc098e4ef74a2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2014 22:46:16 -0500 Subject: [PATCH 31/82] Working on the default app structure. --- CONTRIBUTING.md | 3 --- .../Views}/emails/auth/reminder.blade.php | 0 app/{views => Http/Views}/hello.php | 0 bootstrap/autoload.php | 6 ++++-- bootstrap/paths.php | 14 +++++++------- composer.json | 18 +++++++++++------- {app/config => config}/app.php | 0 {app/config => config}/auth.php | 0 {app/config => config}/cache.php | 0 {app/config => config}/compile.php | 10 +++++++++- {app/config => config}/database.php | 0 {app/config => config}/local/app.php | 0 {app/config => config}/local/database.php | 0 {app/config => config}/mail.php | 0 {app/config => config}/packages/.gitkeep | 0 {app/config => config}/queue.php | 0 {app/config => config}/remote.php | 0 {app/config => config}/services.php | 0 {app/config => config}/session.php | 0 {app/config => config}/testing/cache.php | 0 {app/config => config}/testing/session.php | 0 {app/config => config}/view.php | 2 +- {app/config => config}/workbench.php | 0 {app/database => database}/.gitignore | 0 {app/database => database}/migrations/.gitkeep | 0 {app/database => database}/seeds/.gitkeep | 0 .../seeds/DatabaseSeeder.php | 0 {app/lang => lang}/en/pagination.php | 0 {app/lang => lang}/en/reminders.php | 0 {app/lang => lang}/en/validation.php | 0 public/index.php | 1 + {app/tests => tests}/ExampleTest.php | 0 {app/tests => tests}/TestCase.php | 0 33 files changed, 33 insertions(+), 21 deletions(-) delete mode 100644 CONTRIBUTING.md rename app/{views => Http/Views}/emails/auth/reminder.blade.php (100%) rename app/{views => Http/Views}/hello.php (100%) rename {app/config => config}/app.php (100%) rename {app/config => config}/auth.php (100%) rename {app/config => config}/cache.php (100%) rename {app/config => config}/compile.php (71%) rename {app/config => config}/database.php (100%) rename {app/config => config}/local/app.php (100%) rename {app/config => config}/local/database.php (100%) rename {app/config => config}/mail.php (100%) rename {app/config => config}/packages/.gitkeep (100%) rename {app/config => config}/queue.php (100%) rename {app/config => config}/remote.php (100%) rename {app/config => config}/services.php (100%) rename {app/config => config}/session.php (100%) rename {app/config => config}/testing/cache.php (100%) rename {app/config => config}/testing/session.php (100%) rename {app/config => config}/view.php (95%) rename {app/config => config}/workbench.php (100%) rename {app/database => database}/.gitignore (100%) rename {app/database => database}/migrations/.gitkeep (100%) rename {app/database => database}/seeds/.gitkeep (100%) rename {app/database => database}/seeds/DatabaseSeeder.php (100%) rename {app/lang => lang}/en/pagination.php (100%) rename {app/lang => lang}/en/reminders.php (100%) rename {app/lang => lang}/en/validation.php (100%) rename {app/tests => tests}/ExampleTest.php (100%) rename {app/tests => tests}/TestCase.php (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 6a780c46c89..00000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contribution Guidelines - -Please submit all issues and pull requests to the [laravel/framework](http://github.com/laravel/framework) repository! diff --git a/app/views/emails/auth/reminder.blade.php b/app/Http/Views/emails/auth/reminder.blade.php similarity index 100% rename from app/views/emails/auth/reminder.blade.php rename to app/Http/Views/emails/auth/reminder.blade.php diff --git a/app/views/hello.php b/app/Http/Views/hello.php similarity index 100% rename from app/views/hello.php rename to app/Http/Views/hello.php diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 44c7dfa9ae0..2ae4fc34bfc 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -27,9 +27,11 @@ | */ -if (file_exists($compiled = __DIR__.'/compiled.php')) +$compiledPath = __DIR__.'/../storage/meta/compiled.php'; + +if (file_exists($compiledPath)) { - require $compiled; + require $compiledPath; } /* diff --git a/bootstrap/paths.php b/bootstrap/paths.php index df0104798f2..c0f427e837a 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -65,12 +65,12 @@ | */ - 'commands' => __DIR__.'/../app/console', - 'config' => __DIR__.'/../app/config', - 'controllers' => __DIR__.'/../app/http/controllers', - 'database' => __DIR__.'/../app/database', - 'filters' => __DIR__.'/../app/http/filters', - 'lang' => __DIR__.'/../app/lang', - 'requests' => __DIR__.'/../app/http/requests', + 'commands' => __DIR__.'/../app/Console', + 'config' => __DIR__.'/../config', + 'controllers' => __DIR__.'/../app/Http/Controllers', + 'database' => __DIR__.'/../database', + 'filters' => __DIR__.'/../app/Http/Filters', + 'lang' => __DIR__.'/../lang', + 'requests' => __DIR__.'/../app/Http/Requests', ); diff --git a/composer.json b/composer.json index cdd53d7ba4a..f4493dea0f2 100644 --- a/composer.json +++ b/composer.json @@ -4,18 +4,22 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.3.*" + "laravel/framework": "4.3.*", + "phpunit/phpunit": "~4.0" }, "autoload": { "classmap": [ - "app/console", - "app/database", - "app/http", - "app/tests/TestCase.php" + "app/Console", + "app/Http/Controllers", + "database", + "app/Http/Filters", + "app/Providers", + "app/Http/Requests", + "tests/TestCase.php" ], "psr-4": { - "App\\": "app/core/", - "Providers\\": "app/providers/" + "App\\": "app/Core/", + "Providers\\": "app/Providers/" } }, "scripts": { diff --git a/app/config/app.php b/config/app.php similarity index 100% rename from app/config/app.php rename to config/app.php diff --git a/app/config/auth.php b/config/auth.php similarity index 100% rename from app/config/auth.php rename to config/auth.php diff --git a/app/config/cache.php b/config/cache.php similarity index 100% rename from app/config/cache.php rename to config/cache.php diff --git a/app/config/compile.php b/config/compile.php similarity index 71% rename from app/config/compile.php rename to config/compile.php index 7f6d7b5f9e5..f21c236d924 100644 --- a/app/config/compile.php +++ b/config/compile.php @@ -14,7 +14,15 @@ */ 'files' => array( - // + + __DIR__.'/../providers/AppServiceProvider.php', + __DIR__.'/../providers/ArtisanServiceProvider.php', + __DIR__.'/../providers/ErrorServiceProvider.php', + __DIR__.'/../providers/EventServiceProvider.php', + __DIR__.'/../providers/FilterServiceProvider.php', + __DIR__.'/../providers/LogServiceProvider.php', + __DIR__.'/../providers/RouteServiceProvider.php', + ), /* diff --git a/app/config/database.php b/config/database.php similarity index 100% rename from app/config/database.php rename to config/database.php diff --git a/app/config/local/app.php b/config/local/app.php similarity index 100% rename from app/config/local/app.php rename to config/local/app.php diff --git a/app/config/local/database.php b/config/local/database.php similarity index 100% rename from app/config/local/database.php rename to config/local/database.php diff --git a/app/config/mail.php b/config/mail.php similarity index 100% rename from app/config/mail.php rename to config/mail.php diff --git a/app/config/packages/.gitkeep b/config/packages/.gitkeep similarity index 100% rename from app/config/packages/.gitkeep rename to config/packages/.gitkeep diff --git a/app/config/queue.php b/config/queue.php similarity index 100% rename from app/config/queue.php rename to config/queue.php diff --git a/app/config/remote.php b/config/remote.php similarity index 100% rename from app/config/remote.php rename to config/remote.php diff --git a/app/config/services.php b/config/services.php similarity index 100% rename from app/config/services.php rename to config/services.php diff --git a/app/config/session.php b/config/session.php similarity index 100% rename from app/config/session.php rename to config/session.php diff --git a/app/config/testing/cache.php b/config/testing/cache.php similarity index 100% rename from app/config/testing/cache.php rename to config/testing/cache.php diff --git a/app/config/testing/session.php b/config/testing/session.php similarity index 100% rename from app/config/testing/session.php rename to config/testing/session.php diff --git a/app/config/view.php b/config/view.php similarity index 95% rename from app/config/view.php rename to config/view.php index 34b8f387359..421b84ae29c 100644 --- a/app/config/view.php +++ b/config/view.php @@ -13,7 +13,7 @@ | */ - 'paths' => array(__DIR__.'/../views'), + 'paths' => array(app_path().'/Http/Views'), /* |-------------------------------------------------------------------------- diff --git a/app/config/workbench.php b/config/workbench.php similarity index 100% rename from app/config/workbench.php rename to config/workbench.php diff --git a/app/database/.gitignore b/database/.gitignore similarity index 100% rename from app/database/.gitignore rename to database/.gitignore diff --git a/app/database/migrations/.gitkeep b/database/migrations/.gitkeep similarity index 100% rename from app/database/migrations/.gitkeep rename to database/migrations/.gitkeep diff --git a/app/database/seeds/.gitkeep b/database/seeds/.gitkeep similarity index 100% rename from app/database/seeds/.gitkeep rename to database/seeds/.gitkeep diff --git a/app/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php similarity index 100% rename from app/database/seeds/DatabaseSeeder.php rename to database/seeds/DatabaseSeeder.php diff --git a/app/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from app/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/app/lang/en/reminders.php b/lang/en/reminders.php similarity index 100% rename from app/lang/en/reminders.php rename to lang/en/reminders.php diff --git a/app/lang/en/validation.php b/lang/en/validation.php similarity index 100% rename from app/lang/en/validation.php rename to lang/en/validation.php diff --git a/public/index.php b/public/index.php index 6da55083d3d..f08822d9536 100644 --- a/public/index.php +++ b/public/index.php @@ -45,4 +45,5 @@ | and wonderful application we have whipped up for them. | */ + $app->run(); diff --git a/app/tests/ExampleTest.php b/tests/ExampleTest.php similarity index 100% rename from app/tests/ExampleTest.php rename to tests/ExampleTest.php diff --git a/app/tests/TestCase.php b/tests/TestCase.php similarity index 100% rename from app/tests/TestCase.php rename to tests/TestCase.php From a9a41d7b9624ef340e8959334013a3019249ec9f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2014 23:19:53 -0500 Subject: [PATCH 32/82] Update paths. --- bootstrap/paths.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index c0f427e837a..abc5117f808 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -71,6 +71,7 @@ 'database' => __DIR__.'/../database', 'filters' => __DIR__.'/../app/Http/Filters', 'lang' => __DIR__.'/../lang', + 'providers' => __DIR__.'/../app/Providers', 'requests' => __DIR__.'/../app/Http/Requests', ); From 79bcb450dde34b0b76288f0bcf3d1a0516e5c81c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2014 23:22:42 -0500 Subject: [PATCH 33/82] Fix compile file. --- config/compile.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/compile.php b/config/compile.php index f21c236d924..b84e92b022f 100644 --- a/config/compile.php +++ b/config/compile.php @@ -15,13 +15,13 @@ 'files' => array( - __DIR__.'/../providers/AppServiceProvider.php', - __DIR__.'/../providers/ArtisanServiceProvider.php', - __DIR__.'/../providers/ErrorServiceProvider.php', - __DIR__.'/../providers/EventServiceProvider.php', - __DIR__.'/../providers/FilterServiceProvider.php', - __DIR__.'/../providers/LogServiceProvider.php', - __DIR__.'/../providers/RouteServiceProvider.php', + __DIR__.'/../app/Providers/AppServiceProvider.php', + __DIR__.'/../app/Providers/ArtisanServiceProvider.php', + __DIR__.'/../app/Providers/ErrorServiceProvider.php', + __DIR__.'/../app/Providers/EventServiceProvider.php', + __DIR__.'/../app/Providers/FilterServiceProvider.php', + __DIR__.'/../app/Providers/LogServiceProvider.php', + __DIR__.'/../app/Providers/RouteServiceProvider.php', ), From 3ffbb5d6ba5ae14a71d916858fffcf2dd07bed82 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2014 23:42:49 -0500 Subject: [PATCH 34/82] Renaming folders. --- app/{console => ConsoleBkp}/InspireCommand.php | 0 app/{core => CoreBkp}/User.php | 0 app/{http/controllers => HttpBkp/Controllers}/HomeController.php | 0 app/{http/filters => HttpBkp/Filters}/AuthFilter.php | 0 app/{http/filters => HttpBkp/Filters}/BasicAuthFilter.php | 0 app/{http/filters => HttpBkp/Filters}/CsrfFilter.php | 0 app/{http/filters => HttpBkp/Filters}/GuestFilter.php | 0 app/{http/filters => HttpBkp/Filters}/MaintenanceFilter.php | 0 app/{http/requests => HttpBkp/Requests}/.gitkeep | 0 app/{Http => HttpBkp}/Views/emails/auth/reminder.blade.php | 0 app/{Http => HttpBkp}/Views/hello.php | 0 app/{providers => ProvidersBkp}/AppServiceProvider.php | 0 app/{providers => ProvidersBkp}/ArtisanServiceProvider.php | 0 app/{providers => ProvidersBkp}/ErrorServiceProvider.php | 0 app/{providers => ProvidersBkp}/EventServiceProvider.php | 0 app/{providers => ProvidersBkp}/FilterServiceProvider.php | 0 app/{providers => ProvidersBkp}/LogServiceProvider.php | 0 app/{providers => ProvidersBkp}/RouteServiceProvider.php | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename app/{console => ConsoleBkp}/InspireCommand.php (100%) rename app/{core => CoreBkp}/User.php (100%) rename app/{http/controllers => HttpBkp/Controllers}/HomeController.php (100%) rename app/{http/filters => HttpBkp/Filters}/AuthFilter.php (100%) rename app/{http/filters => HttpBkp/Filters}/BasicAuthFilter.php (100%) rename app/{http/filters => HttpBkp/Filters}/CsrfFilter.php (100%) rename app/{http/filters => HttpBkp/Filters}/GuestFilter.php (100%) rename app/{http/filters => HttpBkp/Filters}/MaintenanceFilter.php (100%) rename app/{http/requests => HttpBkp/Requests}/.gitkeep (100%) rename app/{Http => HttpBkp}/Views/emails/auth/reminder.blade.php (100%) rename app/{Http => HttpBkp}/Views/hello.php (100%) rename app/{providers => ProvidersBkp}/AppServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/ArtisanServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/ErrorServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/EventServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/FilterServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/LogServiceProvider.php (100%) rename app/{providers => ProvidersBkp}/RouteServiceProvider.php (100%) diff --git a/app/console/InspireCommand.php b/app/ConsoleBkp/InspireCommand.php similarity index 100% rename from app/console/InspireCommand.php rename to app/ConsoleBkp/InspireCommand.php diff --git a/app/core/User.php b/app/CoreBkp/User.php similarity index 100% rename from app/core/User.php rename to app/CoreBkp/User.php diff --git a/app/http/controllers/HomeController.php b/app/HttpBkp/Controllers/HomeController.php similarity index 100% rename from app/http/controllers/HomeController.php rename to app/HttpBkp/Controllers/HomeController.php diff --git a/app/http/filters/AuthFilter.php b/app/HttpBkp/Filters/AuthFilter.php similarity index 100% rename from app/http/filters/AuthFilter.php rename to app/HttpBkp/Filters/AuthFilter.php diff --git a/app/http/filters/BasicAuthFilter.php b/app/HttpBkp/Filters/BasicAuthFilter.php similarity index 100% rename from app/http/filters/BasicAuthFilter.php rename to app/HttpBkp/Filters/BasicAuthFilter.php diff --git a/app/http/filters/CsrfFilter.php b/app/HttpBkp/Filters/CsrfFilter.php similarity index 100% rename from app/http/filters/CsrfFilter.php rename to app/HttpBkp/Filters/CsrfFilter.php diff --git a/app/http/filters/GuestFilter.php b/app/HttpBkp/Filters/GuestFilter.php similarity index 100% rename from app/http/filters/GuestFilter.php rename to app/HttpBkp/Filters/GuestFilter.php diff --git a/app/http/filters/MaintenanceFilter.php b/app/HttpBkp/Filters/MaintenanceFilter.php similarity index 100% rename from app/http/filters/MaintenanceFilter.php rename to app/HttpBkp/Filters/MaintenanceFilter.php diff --git a/app/http/requests/.gitkeep b/app/HttpBkp/Requests/.gitkeep similarity index 100% rename from app/http/requests/.gitkeep rename to app/HttpBkp/Requests/.gitkeep diff --git a/app/Http/Views/emails/auth/reminder.blade.php b/app/HttpBkp/Views/emails/auth/reminder.blade.php similarity index 100% rename from app/Http/Views/emails/auth/reminder.blade.php rename to app/HttpBkp/Views/emails/auth/reminder.blade.php diff --git a/app/Http/Views/hello.php b/app/HttpBkp/Views/hello.php similarity index 100% rename from app/Http/Views/hello.php rename to app/HttpBkp/Views/hello.php diff --git a/app/providers/AppServiceProvider.php b/app/ProvidersBkp/AppServiceProvider.php similarity index 100% rename from app/providers/AppServiceProvider.php rename to app/ProvidersBkp/AppServiceProvider.php diff --git a/app/providers/ArtisanServiceProvider.php b/app/ProvidersBkp/ArtisanServiceProvider.php similarity index 100% rename from app/providers/ArtisanServiceProvider.php rename to app/ProvidersBkp/ArtisanServiceProvider.php diff --git a/app/providers/ErrorServiceProvider.php b/app/ProvidersBkp/ErrorServiceProvider.php similarity index 100% rename from app/providers/ErrorServiceProvider.php rename to app/ProvidersBkp/ErrorServiceProvider.php diff --git a/app/providers/EventServiceProvider.php b/app/ProvidersBkp/EventServiceProvider.php similarity index 100% rename from app/providers/EventServiceProvider.php rename to app/ProvidersBkp/EventServiceProvider.php diff --git a/app/providers/FilterServiceProvider.php b/app/ProvidersBkp/FilterServiceProvider.php similarity index 100% rename from app/providers/FilterServiceProvider.php rename to app/ProvidersBkp/FilterServiceProvider.php diff --git a/app/providers/LogServiceProvider.php b/app/ProvidersBkp/LogServiceProvider.php similarity index 100% rename from app/providers/LogServiceProvider.php rename to app/ProvidersBkp/LogServiceProvider.php diff --git a/app/providers/RouteServiceProvider.php b/app/ProvidersBkp/RouteServiceProvider.php similarity index 100% rename from app/providers/RouteServiceProvider.php rename to app/ProvidersBkp/RouteServiceProvider.php From 80a60552d7e2051695798000ad92a07e38d63619 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2014 23:43:10 -0500 Subject: [PATCH 35/82] Rename. --- app/{ConsoleBkp => Console}/InspireCommand.php | 0 app/{CoreBkp => Core}/User.php | 0 app/{HttpBkp => Http}/Controllers/HomeController.php | 0 app/{HttpBkp => Http}/Filters/AuthFilter.php | 0 app/{HttpBkp => Http}/Filters/BasicAuthFilter.php | 0 app/{HttpBkp => Http}/Filters/CsrfFilter.php | 0 app/{HttpBkp => Http}/Filters/GuestFilter.php | 0 app/{HttpBkp => Http}/Filters/MaintenanceFilter.php | 0 app/{HttpBkp => Http}/Requests/.gitkeep | 0 app/{HttpBkp => Http}/Views/emails/auth/reminder.blade.php | 0 app/{HttpBkp => Http}/Views/hello.php | 0 app/{ProvidersBkp => Providers}/AppServiceProvider.php | 0 app/{ProvidersBkp => Providers}/ArtisanServiceProvider.php | 0 app/{ProvidersBkp => Providers}/ErrorServiceProvider.php | 0 app/{ProvidersBkp => Providers}/EventServiceProvider.php | 0 app/{ProvidersBkp => Providers}/FilterServiceProvider.php | 0 app/{ProvidersBkp => Providers}/LogServiceProvider.php | 0 app/{ProvidersBkp => Providers}/RouteServiceProvider.php | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename app/{ConsoleBkp => Console}/InspireCommand.php (100%) rename app/{CoreBkp => Core}/User.php (100%) rename app/{HttpBkp => Http}/Controllers/HomeController.php (100%) rename app/{HttpBkp => Http}/Filters/AuthFilter.php (100%) rename app/{HttpBkp => Http}/Filters/BasicAuthFilter.php (100%) rename app/{HttpBkp => Http}/Filters/CsrfFilter.php (100%) rename app/{HttpBkp => Http}/Filters/GuestFilter.php (100%) rename app/{HttpBkp => Http}/Filters/MaintenanceFilter.php (100%) rename app/{HttpBkp => Http}/Requests/.gitkeep (100%) rename app/{HttpBkp => Http}/Views/emails/auth/reminder.blade.php (100%) rename app/{HttpBkp => Http}/Views/hello.php (100%) rename app/{ProvidersBkp => Providers}/AppServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/ArtisanServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/ErrorServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/EventServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/FilterServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/LogServiceProvider.php (100%) rename app/{ProvidersBkp => Providers}/RouteServiceProvider.php (100%) diff --git a/app/ConsoleBkp/InspireCommand.php b/app/Console/InspireCommand.php similarity index 100% rename from app/ConsoleBkp/InspireCommand.php rename to app/Console/InspireCommand.php diff --git a/app/CoreBkp/User.php b/app/Core/User.php similarity index 100% rename from app/CoreBkp/User.php rename to app/Core/User.php diff --git a/app/HttpBkp/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php similarity index 100% rename from app/HttpBkp/Controllers/HomeController.php rename to app/Http/Controllers/HomeController.php diff --git a/app/HttpBkp/Filters/AuthFilter.php b/app/Http/Filters/AuthFilter.php similarity index 100% rename from app/HttpBkp/Filters/AuthFilter.php rename to app/Http/Filters/AuthFilter.php diff --git a/app/HttpBkp/Filters/BasicAuthFilter.php b/app/Http/Filters/BasicAuthFilter.php similarity index 100% rename from app/HttpBkp/Filters/BasicAuthFilter.php rename to app/Http/Filters/BasicAuthFilter.php diff --git a/app/HttpBkp/Filters/CsrfFilter.php b/app/Http/Filters/CsrfFilter.php similarity index 100% rename from app/HttpBkp/Filters/CsrfFilter.php rename to app/Http/Filters/CsrfFilter.php diff --git a/app/HttpBkp/Filters/GuestFilter.php b/app/Http/Filters/GuestFilter.php similarity index 100% rename from app/HttpBkp/Filters/GuestFilter.php rename to app/Http/Filters/GuestFilter.php diff --git a/app/HttpBkp/Filters/MaintenanceFilter.php b/app/Http/Filters/MaintenanceFilter.php similarity index 100% rename from app/HttpBkp/Filters/MaintenanceFilter.php rename to app/Http/Filters/MaintenanceFilter.php diff --git a/app/HttpBkp/Requests/.gitkeep b/app/Http/Requests/.gitkeep similarity index 100% rename from app/HttpBkp/Requests/.gitkeep rename to app/Http/Requests/.gitkeep diff --git a/app/HttpBkp/Views/emails/auth/reminder.blade.php b/app/Http/Views/emails/auth/reminder.blade.php similarity index 100% rename from app/HttpBkp/Views/emails/auth/reminder.blade.php rename to app/Http/Views/emails/auth/reminder.blade.php diff --git a/app/HttpBkp/Views/hello.php b/app/Http/Views/hello.php similarity index 100% rename from app/HttpBkp/Views/hello.php rename to app/Http/Views/hello.php diff --git a/app/ProvidersBkp/AppServiceProvider.php b/app/Providers/AppServiceProvider.php similarity index 100% rename from app/ProvidersBkp/AppServiceProvider.php rename to app/Providers/AppServiceProvider.php diff --git a/app/ProvidersBkp/ArtisanServiceProvider.php b/app/Providers/ArtisanServiceProvider.php similarity index 100% rename from app/ProvidersBkp/ArtisanServiceProvider.php rename to app/Providers/ArtisanServiceProvider.php diff --git a/app/ProvidersBkp/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php similarity index 100% rename from app/ProvidersBkp/ErrorServiceProvider.php rename to app/Providers/ErrorServiceProvider.php diff --git a/app/ProvidersBkp/EventServiceProvider.php b/app/Providers/EventServiceProvider.php similarity index 100% rename from app/ProvidersBkp/EventServiceProvider.php rename to app/Providers/EventServiceProvider.php diff --git a/app/ProvidersBkp/FilterServiceProvider.php b/app/Providers/FilterServiceProvider.php similarity index 100% rename from app/ProvidersBkp/FilterServiceProvider.php rename to app/Providers/FilterServiceProvider.php diff --git a/app/ProvidersBkp/LogServiceProvider.php b/app/Providers/LogServiceProvider.php similarity index 100% rename from app/ProvidersBkp/LogServiceProvider.php rename to app/Providers/LogServiceProvider.php diff --git a/app/ProvidersBkp/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php similarity index 100% rename from app/ProvidersBkp/RouteServiceProvider.php rename to app/Providers/RouteServiceProvider.php From aae8ef30591c6ad323943de806c8d2d56a1aabd8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 19 Aug 2014 00:03:15 -0500 Subject: [PATCH 36/82] Fix gitignore files. --- .gitignore | 1 - storage/meta/.gitignore | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b5363f02031..b07790b47fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/bootstrap/compiled.php /vendor composer.phar composer.lock diff --git a/storage/meta/.gitignore b/storage/meta/.gitignore index e2ed1a67814..fe030f7e8fd 100644 --- a/storage/meta/.gitignore +++ b/storage/meta/.gitignore @@ -1,3 +1,4 @@ +compiled.php services.json routes.php services.php From 177d1ebb7a16de0c8d0187b5a64172eece404bfb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 00:10:30 -0500 Subject: [PATCH 37/82] Mega work on structure. --- app/Console/InspireCommand.php | 2 +- app/Http/Controllers/HomeController.php | 6 ++--- app/Http/Filters/AuthFilter.php | 3 ++- app/Http/Filters/BasicAuthFilter.php | 4 ++- app/Http/Filters/CsrfFilter.php | 6 +++-- app/Http/Filters/GuestFilter.php | 4 ++- app/Http/Filters/MaintenanceFilter.php | 4 ++- app/{ => Http}/routes.php | 0 app/Providers/AppServiceProvider.php | 2 +- app/Providers/ArtisanServiceProvider.php | 2 +- app/Providers/ErrorServiceProvider.php | 2 +- app/Providers/EventServiceProvider.php | 2 +- app/Providers/FilterServiceProvider.php | 12 ++++----- app/Providers/LogServiceProvider.php | 2 +- app/Providers/RouteServiceProvider.php | 7 ++++-- app/{Core => }/User.php | 0 composer.json | 8 +----- config/app.php | 14 +++++------ config/namespaces.php | 31 ++++++++++++++++++++++++ 19 files changed, 74 insertions(+), 37 deletions(-) rename app/{ => Http}/routes.php (100%) rename app/{Core => }/User.php (100%) create mode 100644 config/namespaces.php diff --git a/app/Console/InspireCommand.php b/app/Console/InspireCommand.php index 404fcdd0dc8..777b2f4ec67 100644 --- a/app/Console/InspireCommand.php +++ b/app/Console/InspireCommand.php @@ -1,4 +1,4 @@ -input('_token')) { - throw new Illuminate\Session\TokenMismatchException; + throw new TokenMismatchException; } } diff --git a/app/Http/Filters/GuestFilter.php b/app/Http/Filters/GuestFilter.php index 08cee12bb98..752efc2ec2f 100644 --- a/app/Http/Filters/GuestFilter.php +++ b/app/Http/Filters/GuestFilter.php @@ -1,4 +1,6 @@ - 'AuthFilter', - 'auth.basic' => 'BasicAuthFilter', - 'csrf' => 'CsrfFilter', - 'guest' => 'GuestFilter', + 'auth' => 'App\Http\Filters\AuthFilter', + 'auth.basic' => 'App\Http\Filters\BasicAuthFilter', + 'csrf' => 'App\Http\Filters\CsrfFilter', + 'guest' => 'App\Http\Filters\GuestFilter', ]; } \ No newline at end of file diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index a1fb8f2d726..67fa3fe1e04 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -1,4 +1,4 @@ -app->booted(function() { - require app('path').'/routes.php'; + $this->namespaced(function() + { + require app('path').'/Http/routes.php'; + }); }); } diff --git a/app/Core/User.php b/app/User.php similarity index 100% rename from app/Core/User.php rename to app/User.php diff --git a/composer.json b/composer.json index f4493dea0f2..0e4084f1710 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,11 @@ }, "autoload": { "classmap": [ - "app/Console", - "app/Http/Controllers", "database", - "app/Http/Filters", - "app/Providers", - "app/Http/Requests", "tests/TestCase.php" ], "psr-4": { - "App\\": "app/Core/", - "Providers\\": "app/Providers/" + "App\\": "app/" } }, "scripts": { diff --git a/config/app.php b/config/app.php index 230e3d87f73..f45aa5257e1 100644 --- a/config/app.php +++ b/config/app.php @@ -98,13 +98,13 @@ /* * Application Service Providers... */ - 'Providers\AppServiceProvider', - 'Providers\ArtisanServiceProvider', - 'Providers\ErrorServiceProvider', - 'Providers\EventServiceProvider', - 'Providers\FilterServiceProvider', - 'Providers\LogServiceProvider', - 'Providers\RouteServiceProvider', + 'App\Providers\AppServiceProvider', + 'App\Providers\ArtisanServiceProvider', + 'App\Providers\ErrorServiceProvider', + 'App\Providers\EventServiceProvider', + 'App\Providers\FilterServiceProvider', + 'App\Providers\LogServiceProvider', + 'App\Providers\RouteServiceProvider', /* * Laravel Framework Service Providers... diff --git a/config/namespaces.php b/config/namespaces.php new file mode 100644 index 00000000000..30b527c4b79 --- /dev/null +++ b/config/namespaces.php @@ -0,0 +1,31 @@ + 'App\\', + + /* + |-------------------------------------------------------------------------- + | Root Controller Namespace + |-------------------------------------------------------------------------- + | + | This namespace will be automatically prepended to URLs generated via + | the URL generator for controller actions, allowing for the simple + | and convenient referencing of your namespaced controller class. + | + */ + + 'controllers' => 'App\Http\Controllers', + +); From eb4f536c44424e628824d5041e413e09cc160834 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 00:11:13 -0500 Subject: [PATCH 38/82] Set console command name. --- app/Providers/ArtisanServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/ArtisanServiceProvider.php b/app/Providers/ArtisanServiceProvider.php index afdc61ecd40..d16fd69b66f 100644 --- a/app/Providers/ArtisanServiceProvider.php +++ b/app/Providers/ArtisanServiceProvider.php @@ -12,7 +12,7 @@ class ArtisanServiceProvider extends ServiceProvider { */ public function register() { - $this->commands('InspireCommand'); + $this->commands('App\Console\InspireCommand'); } } \ No newline at end of file From cadc592ee28f08beeed33d231e68382b3ee772c9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 00:39:17 -0500 Subject: [PATCH 39/82] Update controller namespace. --- config/namespaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/namespaces.php b/config/namespaces.php index 30b527c4b79..9ccfafb6d61 100644 --- a/config/namespaces.php +++ b/config/namespaces.php @@ -26,6 +26,6 @@ | */ - 'controllers' => 'App\Http\Controllers', + 'controllers' => 'App\\Http\\Controllers\\', ); From e084583077a781f6f0792af649a2ab7d2b37404c Mon Sep 17 00:00:00 2001 From: crynobone Date: Wed, 20 Aug 2014 19:36:09 +0800 Subject: [PATCH 40/82] Move PHPUnit to require-dev and fixes directory references to tests. Signed-off-by: crynobone --- composer.json | 4 +++- phpunit.xml | 2 +- tests/TestCase.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 0e4084f1710..f4990e9a6f2 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,9 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.3.*", + "laravel/framework": "4.3.*" + }, + "require-dev": { "phpunit/phpunit": "~4.0" }, "autoload": { diff --git a/phpunit.xml b/phpunit.xml index c330420569c..8745dfab784 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -12,7 +12,7 @@ > - ./app/tests/ + ./tests/ diff --git a/tests/TestCase.php b/tests/TestCase.php index d367fe53d4a..2d3429392df 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -13,7 +13,7 @@ public function createApplication() $testEnvironment = 'testing'; - return require __DIR__.'/../../bootstrap/start.php'; + return require __DIR__.'/../bootstrap/start.php'; } } From 2ab3d52540fe6a2fe60a351f9ad4e334f86bbb16 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 12:48:58 -0500 Subject: [PATCH 41/82] Add note. --- app/Providers/RouteServiceProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index dde5ff8204d..b7a9c5bb432 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -25,6 +25,10 @@ public function map() { $this->app->booted(function() { + // Once the application has booted, we will include the default routes + // file. This "namespace" helper will load the routes file within a + // route group which automatically sets the controller namespace. + $this->namespaced(function() { require app('path').'/Http/routes.php'; From 838b20d4a01f6f51da4d28f848a81beeb827049c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 17:04:09 -0500 Subject: [PATCH 42/82] Use facades. --- app/Providers/ErrorServiceProvider.php | 6 ++++-- app/Providers/LogServiceProvider.php | 9 ++------- app/Providers/RouteServiceProvider.php | 5 +++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index fb1cb28afed..738eed7f1f7 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -1,5 +1,7 @@ app->error(function(\Exception $exception, $code) + App::error(function(Exception $exception, $code) { - $this->app['log']->error($exception); + Log::error($exception); }); } diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index 67fa3fe1e04..acdd1c2e38e 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -1,5 +1,6 @@ app['log']->useFiles( - storage_path().'/logs/laravel.log' - ); + Log::useFiles(storage_path().'/logs/laravel.log'); } /** diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index b7a9c5bb432..2e7465550ba 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,5 +1,6 @@ app->booted(function() + App::booted(function() { // Once the application has booted, we will include the default routes // file. This "namespace" helper will load the routes file within a @@ -31,7 +32,7 @@ public function map() $this->namespaced(function() { - require app('path').'/Http/routes.php'; + require app_path().'/Http/routes.php'; }); }); } From 59289aff689f2f3f94610b883b84930b6cef1c47 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 20:41:24 -0500 Subject: [PATCH 43/82] Tweak where views and lang files are located. --- bootstrap/paths.php | 2 +- config/view.php | 2 +- {lang => resources/lang}/en/pagination.php | 0 {lang => resources/lang}/en/reminders.php | 0 {lang => resources/lang}/en/validation.php | 0 .../Views => resources/views}/emails/auth/reminder.blade.php | 0 {app/Http/Views => resources/views}/hello.php | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename {lang => resources/lang}/en/pagination.php (100%) rename {lang => resources/lang}/en/reminders.php (100%) rename {lang => resources/lang}/en/validation.php (100%) rename {app/Http/Views => resources/views}/emails/auth/reminder.blade.php (100%) rename {app/Http/Views => resources/views}/hello.php (100%) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index abc5117f808..d004a9623b5 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -70,7 +70,7 @@ 'controllers' => __DIR__.'/../app/Http/Controllers', 'database' => __DIR__.'/../database', 'filters' => __DIR__.'/../app/Http/Filters', - 'lang' => __DIR__.'/../lang', + 'lang' => __DIR__.'/../resources/lang', 'providers' => __DIR__.'/../app/Providers', 'requests' => __DIR__.'/../app/Http/Requests', diff --git a/config/view.php b/config/view.php index 421b84ae29c..0604cf4be8a 100644 --- a/config/view.php +++ b/config/view.php @@ -13,7 +13,7 @@ | */ - 'paths' => array(app_path().'/Http/Views'), + 'paths' => array(base_path().'/resources/views'), /* |-------------------------------------------------------------------------- diff --git a/lang/en/pagination.php b/resources/lang/en/pagination.php similarity index 100% rename from lang/en/pagination.php rename to resources/lang/en/pagination.php diff --git a/lang/en/reminders.php b/resources/lang/en/reminders.php similarity index 100% rename from lang/en/reminders.php rename to resources/lang/en/reminders.php diff --git a/lang/en/validation.php b/resources/lang/en/validation.php similarity index 100% rename from lang/en/validation.php rename to resources/lang/en/validation.php diff --git a/app/Http/Views/emails/auth/reminder.blade.php b/resources/views/emails/auth/reminder.blade.php similarity index 100% rename from app/Http/Views/emails/auth/reminder.blade.php rename to resources/views/emails/auth/reminder.blade.php diff --git a/app/Http/Views/hello.php b/resources/views/hello.php similarity index 100% rename from app/Http/Views/hello.php rename to resources/views/hello.php From e7617ff19b7a6519a8ed695c5d5f3689668e5b84 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 21:46:01 -0500 Subject: [PATCH 44/82] Change how controller is aliased. --- app/Http/Controllers/HomeController.php | 2 +- config/app.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index ea9253ae6a8..a8ceadd8ac7 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,6 +1,6 @@ 'Illuminate\Support\Facades\Blade', 'Cache' => 'Illuminate\Support\Facades\Cache', 'Config' => 'Illuminate\Support\Facades\Config', - 'Controller' => 'Illuminate\Routing\Controller', + 'App\Http\Controllers\Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', From aeffa1766f3af4511def37c9de7968f6cc17c40c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 20 Aug 2014 23:32:40 -0500 Subject: [PATCH 45/82] Fix path. --- app/Providers/EventServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index d464fbe68bb..4aba16d7c52 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -22,7 +22,7 @@ public function boot() public function scan() { return [ - app_path().'/src', + app_path(), ]; } From 479461e01fbbca9a3fc81761b35546f8e415e4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Pav=C3=B3n?= Date: Thu, 21 Aug 2014 13:42:32 +0100 Subject: [PATCH 46/82] Simplify .gitignore's .env --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b07790b47fc..b9604dc6ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /vendor composer.phar composer.lock -.env.*.php -.env.php +.env.* .DS_Store Thumbs.db From 4204337382b2ac2a45ff4839b268a2e967718a55 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Aug 2014 10:36:50 -0500 Subject: [PATCH 47/82] Remove remote provider. --- config/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/app.php b/config/app.php index da349ed4158..886b5b48c15 100644 --- a/config/app.php +++ b/config/app.php @@ -126,7 +126,6 @@ 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', - 'Illuminate\Remote\RemoteServiceProvider', 'Illuminate\Auth\Reminders\ReminderServiceProvider', 'Illuminate\Database\SeedServiceProvider', 'Illuminate\Session\SessionServiceProvider', From a68933d34c7cedbb88a8f9a2bb0adfdda73130d4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Aug 2014 12:47:40 -0500 Subject: [PATCH 48/82] Remove some service providers and aliases. --- config/app.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/app.php b/config/app.php index 886b5b48c15..4a21c67c80e 100644 --- a/config/app.php +++ b/config/app.php @@ -119,7 +119,6 @@ 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Foundation\Providers\FormRequestServiceProvider', 'Illuminate\Hashing\HashServiceProvider', - 'Illuminate\Html\HtmlServiceProvider', 'Illuminate\Log\LogServiceProvider', 'Illuminate\Mail\MailServiceProvider', 'Illuminate\Database\MigrationServiceProvider', @@ -174,10 +173,8 @@ 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File', - 'Form' => 'Illuminate\Support\Facades\Form', 'FormRequest' => 'Illuminate\Foundation\Http\FormRequest', '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', @@ -194,7 +191,6 @@ 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', - 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', From c9fb1c911061535733c3f11904a7759d8cb81eb5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Aug 2014 21:25:03 -0500 Subject: [PATCH 49/82] Fixing a few things. Namespace configuration. --- bootstrap/paths.php | 2 +- config/namespaces.php | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index d004a9623b5..966989bc859 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -65,7 +65,7 @@ | */ - 'commands' => __DIR__.'/../app/Console', + 'console' => __DIR__.'/../app/Console', 'config' => __DIR__.'/../config', 'controllers' => __DIR__.'/../app/Http/Controllers', 'database' => __DIR__.'/../database', diff --git a/config/namespaces.php b/config/namespaces.php index 9ccfafb6d61..1e77e716d94 100644 --- a/config/namespaces.php +++ b/config/namespaces.php @@ -17,15 +17,23 @@ /* |-------------------------------------------------------------------------- - | Root Controller Namespace + | Generator Namespaces |-------------------------------------------------------------------------- | - | This namespace will be automatically prepended to URLs generated via - | the URL generator for controller actions, allowing for the simple - | and convenient referencing of your namespaced controller class. + | These namespaces are utilized by the various class generator Artisan + | commands. You are free to change them to whatever you wish or not + | at all. The "app:name" command is the easiest way to set these. | */ + 'console' => 'App\Console\\', + 'controllers' => 'App\\Http\\Controllers\\', + 'filters' => 'App\Http\Filters\\', + + 'providers' => 'App\Providers\\', + + 'requests' => 'App\Http\Requests\\', + ); From 35df36febb42085d4722fec7292e796ec5fe1c12 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Aug 2014 22:30:44 -0500 Subject: [PATCH 50/82] Fix slashes. --- config/namespaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/namespaces.php b/config/namespaces.php index 1e77e716d94..953b24a2782 100644 --- a/config/namespaces.php +++ b/config/namespaces.php @@ -28,7 +28,7 @@ 'console' => 'App\Console\\', - 'controllers' => 'App\\Http\\Controllers\\', + 'controllers' => 'App\Http\Controllers\\', 'filters' => 'App\Http\Filters\\', From ca3c8c3e564f6e99162eab8a9bac054ffc416267 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Aug 2014 23:41:47 -0500 Subject: [PATCH 51/82] Remove unnecessary alias. --- app/Http/Controllers/HomeController.php | 2 ++ config/app.php | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index a8ceadd8ac7..f934c007407 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,5 +1,7 @@ 'Illuminate\Support\Facades\Blade', 'Cache' => 'Illuminate\Support\Facades\Cache', 'Config' => 'Illuminate\Support\Facades\Config', - 'App\Http\Controllers\Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', From f6b347b976d4401ba9b4072e650069674fb8f149 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 22 Aug 2014 08:32:07 -0500 Subject: [PATCH 52/82] Add language line. --- resources/lang/en/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index fa89de98c7d..e7599256589 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -35,6 +35,7 @@ "digits" => "The :attribute must be :digits digits.", "digits_between" => "The :attribute must be between :min and :max digits.", "email" => "The :attribute must be a valid email address.", + "filled" => "The :attribute field is required.", "exists" => "The selected :attribute is invalid.", "image" => "The :attribute must be an image.", "in" => "The selected :attribute is invalid.", From d6719eb5e5a4f348a40b2c0e6dc83853fe350307 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 23 Aug 2014 12:50:39 -0500 Subject: [PATCH 53/82] Fix contracts. --- app/User.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/User.php b/app/User.php index e99cff0e36a..31de77d8c5b 100644 --- a/app/User.php +++ b/app/User.php @@ -2,11 +2,11 @@ use Eloquent; use Illuminate\Auth\UserTrait; -use Illuminate\Auth\UserInterface; use Illuminate\Auth\Reminders\RemindableTrait; -use Illuminate\Auth\Reminders\RemindableInterface; +use Illuminate\Contracts\Auth\User as UserContract; +use Illuminate\Contracts\Auth\Remindable as RemindableContract; -class User extends Eloquent implements UserInterface, RemindableInterface { +class User extends Eloquent implements UserContract, RemindableContract { use UserTrait, RemindableTrait; From 3ade971b2391b8811d9be9992870db6ad0f4f501 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 24 Aug 2014 13:55:10 -0500 Subject: [PATCH 54/82] Add filesystem configuration. --- config/filesystems.php | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 config/filesystems.php diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 00000000000..ff7e13394eb --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,69 @@ + 'local', + + /* + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bounc as the Cloud disk implementation in the container. + | + */ + + 'cloud' => 's3', + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => base_path(), + ], + + 's3' => [ + 'driver' => 's3', + 'key' => 'your-key', + 'secret' => 'your-secret', + 'bucket' => 'your-bucket', + ], + + 'rackspace' => [ + 'driver' => 'rackspace', + 'username' => 'your-username', + 'key' => 'your-key', + 'container' => 'your-container', + 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', + 'region' => 'IAD', + ], + + ], + +]; From a204045b28987ef19435c0c64cd27dbe02bf40d1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 24 Aug 2014 13:55:57 -0500 Subject: [PATCH 55/82] Typo. --- config/filesystems.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filesystems.php b/config/filesystems.php index ff7e13394eb..6b57e3b6c93 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -24,7 +24,7 @@ | | Many applications store files both locally and in the cloud. For this | reason, you may specify a default "cloud" driver here. This driver - | will be bounc as the Cloud disk implementation in the container. + | will be bound as the Cloud disk implementation in the container. | */ From 76c84d8652d4024563d94162c08caba6782f7e3c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 24 Aug 2014 14:03:58 -0500 Subject: [PATCH 56/82] Convert configuration PHP 5.4 arrays. --- config/app.php | 12 ++++---- config/auth.php | 8 +++--- config/cache.php | 12 ++++---- config/compile.php | 12 ++++---- config/database.php | 32 ++++++++++----------- config/local/app.php | 4 +-- config/local/database.php | 16 +++++------ config/mail.php | 6 ++-- config/namespaces.php | 4 +-- config/queue.php | 34 +++++++++++----------- config/remote.php | 59 -------------------------------------- config/services.php | 16 +++++------ config/session.php | 6 ++-- config/testing/cache.php | 4 +-- config/testing/session.php | 4 +-- config/view.php | 6 ++-- config/workbench.php | 4 +-- 17 files changed, 88 insertions(+), 151 deletions(-) delete mode 100644 config/remote.php diff --git a/config/app.php b/config/app.php index da76e030259..107211127c5 100644 --- a/config/app.php +++ b/config/app.php @@ -1,6 +1,6 @@ array( + 'providers' => [ /* * Application Service Providers... @@ -132,7 +132,7 @@ 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', - ), + ], /* |-------------------------------------------------------------------------- @@ -158,7 +158,7 @@ | */ - 'aliases' => array( + 'aliases' => [ 'App' => 'Illuminate\Support\Facades\App', 'Artisan' => 'Illuminate\Support\Facades\Artisan', @@ -195,6 +195,6 @@ 'Validator' => 'Illuminate\Support\Facades\Validator', 'View' => 'Illuminate\Support\Facades\View', - ), + ], -); +]; diff --git a/config/auth.php b/config/auth.php index 967e0e258d0..b43e1c87cae 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,6 +1,6 @@ array( + 'reminder' => [ 'email' => 'emails.auth.reminder', 'table' => 'password_reminders', 'expire' => 60, - ), + ], -); +]; diff --git a/config/cache.php b/config/cache.php index ce89842399e..e344f799345 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,6 +1,6 @@ array( - - array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), - - ), + 'memcached' => [ + ['host' => '127.0.0.1', 'port' => 11211, 'weight' => 100], + ], /* |-------------------------------------------------------------------------- @@ -86,4 +84,4 @@ 'prefix' => 'laravel', -); +]; diff --git a/config/compile.php b/config/compile.php index b84e92b022f..34840c7e0aa 100644 --- a/config/compile.php +++ b/config/compile.php @@ -1,6 +1,6 @@ array( + 'files' => [ __DIR__.'/../app/Providers/AppServiceProvider.php', __DIR__.'/../app/Providers/ArtisanServiceProvider.php', @@ -23,7 +23,7 @@ __DIR__.'/../app/Providers/LogServiceProvider.php', __DIR__.'/../app/Providers/RouteServiceProvider.php', - ), + ], /* |-------------------------------------------------------------------------- @@ -36,8 +36,8 @@ | */ - 'providers' => array( + 'providers' => [ // - ), + ], -); +]; diff --git a/config/database.php b/config/database.php index 552367c4159..6f2097de852 100644 --- a/config/database.php +++ b/config/database.php @@ -1,6 +1,6 @@ array( + 'connections' => [ - 'sqlite' => array( + 'sqlite' => [ 'driver' => 'sqlite', 'database' => storage_path().'/database.sqlite', 'prefix' => '', - ), + ], - 'mysql' => array( + 'mysql' => [ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'forge', @@ -61,9 +61,9 @@ 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', - ), + ], - 'pgsql' => array( + 'pgsql' => [ 'driver' => 'pgsql', 'host' => 'localhost', 'database' => 'forge', @@ -72,18 +72,18 @@ 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', - ), + ], - 'sqlsrv' => array( + 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => 'localhost', 'database' => 'database', 'username' => 'root', 'password' => '', 'prefix' => '', - ), + ], - ), + ], /* |-------------------------------------------------------------------------- @@ -109,16 +109,16 @@ | */ - 'redis' => array( + 'redis' => [ 'cluster' => false, - 'default' => array( + 'default' => [ 'host' => '127.0.0.1', 'port' => 6379, 'database' => 0, - ), + ], - ), + ], -); +]; diff --git a/config/local/app.php b/config/local/app.php index c56fcb9cef4..5ceb76dce3a 100644 --- a/config/local/app.php +++ b/config/local/app.php @@ -1,6 +1,6 @@ true, -); +]; diff --git a/config/local/database.php b/config/local/database.php index fbcb95aeba9..a42ca21da52 100644 --- a/config/local/database.php +++ b/config/local/database.php @@ -1,6 +1,6 @@ array( + 'connections' => [ - 'mysql' => array( + 'mysql' => [ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'homestead', @@ -29,9 +29,9 @@ 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', - ), + ], - 'pgsql' => array( + 'pgsql' => [ 'driver' => 'pgsql', 'host' => 'localhost', 'database' => 'homestead', @@ -40,8 +40,8 @@ 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', - ), + ], - ), + ], -); +]; diff --git a/config/mail.php b/config/mail.php index 76fd9e4f804..6f9c954271d 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,6 +1,6 @@ array('address' => null, 'name' => null), + 'from' => ['address' => null, 'name' => null], /* |-------------------------------------------------------------------------- @@ -121,4 +121,4 @@ 'pretend' => false, -); +]; diff --git a/config/namespaces.php b/config/namespaces.php index 953b24a2782..1666b5fe208 100644 --- a/config/namespaces.php +++ b/config/namespaces.php @@ -1,6 +1,6 @@ 'App\Http\Requests\\', -); +]; diff --git a/config/queue.php b/config/queue.php index 940a4cdfec7..0d5949da458 100755 --- a/config/queue.php +++ b/config/queue.php @@ -1,6 +1,6 @@ array( + 'connections' => [ - 'sync' => array( + 'sync' => [ 'driver' => 'sync', - ), + ], - 'beanstalkd' => array( + 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', 'ttr' => 60, - ), + ], - 'sqs' => array( + 'sqs' => [ 'driver' => 'sqs', 'key' => 'your-public-key', 'secret' => 'your-secret-key', 'queue' => 'your-queue-url', 'region' => 'us-east-1', - ), + ], - 'iron' => array( + 'iron' => [ 'driver' => 'iron', 'host' => 'mq-aws-us-east-1.iron.io', 'token' => 'your-token', 'project' => 'your-project-id', 'queue' => 'your-queue-name', 'encrypt' => true, - ), + ], - 'redis' => array( + 'redis' => [ 'driver' => 'redis', 'queue' => 'default', - ), + ], - ), + ], /* |-------------------------------------------------------------------------- @@ -76,10 +76,8 @@ | */ - 'failed' => array( - + 'failed' => [ 'database' => 'mysql', 'table' => 'failed_jobs', + ], - ), - -); +]; diff --git a/config/remote.php b/config/remote.php deleted file mode 100644 index 2169c434b4e..00000000000 --- a/config/remote.php +++ /dev/null @@ -1,59 +0,0 @@ - 'production', - - /* - |-------------------------------------------------------------------------- - | Remote Server Connections - |-------------------------------------------------------------------------- - | - | These are the servers that will be accessible via the SSH task runner - | facilities of Laravel. This feature radically simplifies executing - | tasks on your servers, such as deploying out these applications. - | - */ - - 'connections' => array( - - 'production' => array( - 'host' => '', - 'username' => '', - 'password' => '', - 'key' => '', - 'keyphrase' => '', - 'root' => '/var/www', - ), - - ), - - /* - |-------------------------------------------------------------------------- - | Remote Server Groups - |-------------------------------------------------------------------------- - | - | Here you may list connections under a single group name, which allows - | you to easily access all of the servers at once using a short name - | that is extremely easy to remember, such as "web" or "database". - | - */ - - 'groups' => array( - - 'web' => array('production') - - ), - -); diff --git a/config/services.php b/config/services.php index c8aba2a6dad..ead98832cc7 100644 --- a/config/services.php +++ b/config/services.php @@ -1,6 +1,6 @@ array( + 'mailgun' => [ 'domain' => '', 'secret' => '', - ), + ], - 'mandrill' => array( + 'mandrill' => [ 'secret' => '', - ), + ], - 'stripe' => array( + 'stripe' => [ 'model' => 'User', 'secret' => '', - ), + ], -); +]; diff --git a/config/session.php b/config/session.php index ae343029eef..41e1dc1ffe2 100644 --- a/config/session.php +++ b/config/session.php @@ -1,6 +1,6 @@ array(2, 100), + 'lottery' => [2, 100], /* |-------------------------------------------------------------------------- @@ -137,4 +137,4 @@ 'secure' => false, -); +]; diff --git a/config/testing/cache.php b/config/testing/cache.php index 66a8a39a861..729ae3a825a 100644 --- a/config/testing/cache.php +++ b/config/testing/cache.php @@ -1,6 +1,6 @@ 'array', -); +]; diff --git a/config/testing/session.php b/config/testing/session.php index 0364b63dcc1..46bf726a27a 100644 --- a/config/testing/session.php +++ b/config/testing/session.php @@ -1,6 +1,6 @@ 'array', -); +]; diff --git a/config/view.php b/config/view.php index 0604cf4be8a..f5dfa0fdae9 100644 --- a/config/view.php +++ b/config/view.php @@ -1,6 +1,6 @@ array(base_path().'/resources/views'), + 'paths' => [base_path().'/resources/views'], /* |-------------------------------------------------------------------------- @@ -28,4 +28,4 @@ 'pagination' => 'pagination::slider-3', -); +]; diff --git a/config/workbench.php b/config/workbench.php index 87c5e3879ea..6d8830c872d 100644 --- a/config/workbench.php +++ b/config/workbench.php @@ -1,6 +1,6 @@ '', -); +]; From fdba65c0dc6235793fc67e3a3f4c22ecc485f903 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 24 Aug 2014 14:04:21 -0500 Subject: [PATCH 57/82] Convert arrays. --- bootstrap/paths.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 966989bc859..eafe0e62554 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -1,6 +1,6 @@ __DIR__.'/../app/Providers', 'requests' => __DIR__.'/../app/Http/Requests', -); +]; From 78c932f6885ccc685d66c5c14e006b3f351802f6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 27 Aug 2014 12:49:50 +0200 Subject: [PATCH 58/82] Working on a few changes. --- app/Providers/ErrorServiceProvider.php | 11 ++++++---- app/Providers/EventServiceProvider.php | 29 -------------------------- app/Providers/LogServiceProvider.php | 7 ++++--- app/Providers/RouteServiceProvider.php | 3 +-- config/app.php | 1 - config/compile.php | 1 - 6 files changed, 12 insertions(+), 40 deletions(-) delete mode 100644 app/Providers/EventServiceProvider.php diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 738eed7f1f7..1c014498034 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -1,17 +1,20 @@ error(function(Exception $e, $code) use ($log) { - Log::error($exception); + $log->error($e); }); } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php deleted file mode 100644 index 4aba16d7c52..00000000000 --- a/app/Providers/EventServiceProvider.php +++ /dev/null @@ -1,29 +0,0 @@ -useFiles(storage_path().'/logs/laravel.log'); } /** diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 2e7465550ba..8956a5ba138 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,6 +1,5 @@ app->booted(function() { // Once the application has booted, we will include the default routes // file. This "namespace" helper will load the routes file within a diff --git a/config/app.php b/config/app.php index 107211127c5..e9cf25386c7 100644 --- a/config/app.php +++ b/config/app.php @@ -101,7 +101,6 @@ 'App\Providers\AppServiceProvider', 'App\Providers\ArtisanServiceProvider', 'App\Providers\ErrorServiceProvider', - 'App\Providers\EventServiceProvider', 'App\Providers\FilterServiceProvider', 'App\Providers\LogServiceProvider', 'App\Providers\RouteServiceProvider', diff --git a/config/compile.php b/config/compile.php index 34840c7e0aa..31a2c8b3906 100644 --- a/config/compile.php +++ b/config/compile.php @@ -18,7 +18,6 @@ __DIR__.'/../app/Providers/AppServiceProvider.php', __DIR__.'/../app/Providers/ArtisanServiceProvider.php', __DIR__.'/../app/Providers/ErrorServiceProvider.php', - __DIR__.'/../app/Providers/EventServiceProvider.php', __DIR__.'/../app/Providers/FilterServiceProvider.php', __DIR__.'/../app/Providers/LogServiceProvider.php', __DIR__.'/../app/Providers/RouteServiceProvider.php', From 198b54d4adb07d6f1b3441c0496f2b45c0c9fc45 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 27 Aug 2014 21:50:37 +0200 Subject: [PATCH 59/82] Simplify providers. --- app/Providers/ErrorServiceProvider.php | 10 ++++------ app/Providers/LogServiceProvider.php | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 1c014498034..52052ddea54 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -1,9 +1,7 @@ error(function(Exception $e, $code) use ($log) + App::error(function(Exception $e) { - $log->error($e); + Log::error($e); }); } diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index cba36039a9b..12d4855b88f 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -1,6 +1,6 @@ useFiles(storage_path().'/logs/laravel.log'); + Log::useFiles(storage_path().'/logs/laravel.log'); } /** From bde518b59c7a01084e06a7aa60c95ad97fd14e46 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 27 Aug 2014 22:05:56 +0200 Subject: [PATCH 60/82] Use App facade. --- app/Providers/RouteServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 8956a5ba138..2e7465550ba 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,5 +1,6 @@ app->booted(function() + App::booted(function() { // Once the application has booted, we will include the default routes // file. This "namespace" helper will load the routes file within a From a1547b30ad3d98f51cc69d5c24666c5ff826e6f2 Mon Sep 17 00:00:00 2001 From: serhatdurum Date: Thu, 28 Aug 2014 13:07:32 +0300 Subject: [PATCH 61/82] Convert language PHP 5.4 arrays. --- resources/lang/en/pagination.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index 6b99ef5fd86..88e22db6611 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -1,6 +1,6 @@ 'Next »', -); +]; From 5f5cc828d3ab3e0b6c955eb944914eecec8ce1ad Mon Sep 17 00:00:00 2001 From: serhatdurum Date: Thu, 28 Aug 2014 13:08:05 +0300 Subject: [PATCH 62/82] Convert language PHP 5.4 arrays. --- resources/lang/en/reminders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/reminders.php b/resources/lang/en/reminders.php index e2e24e5d5d5..31b68c09101 100644 --- a/resources/lang/en/reminders.php +++ b/resources/lang/en/reminders.php @@ -1,6 +1,6 @@ "Password has been reset!", -); +]; From 01e97e13e25a45d26df39042d1bdaba62d9b39ad Mon Sep 17 00:00:00 2001 From: serhatdurum Date: Thu, 28 Aug 2014 13:15:07 +0300 Subject: [PATCH 63/82] Convert language PHP 5.4 arrays. --- resources/lang/en/validation.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index e71a27b3f51..5e91a44e9c6 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,6 +1,6 @@ "The :attribute may only contain letters and numbers.", "array" => "The :attribute must be an array.", "before" => "The :attribute must be a date before :date.", - "between" => array( + "between" => [ "numeric" => "The :attribute must be between :min and :max.", "file" => "The :attribute must be between :min and :max kilobytes.", "string" => "The :attribute must be between :min and :max characters.", "array" => "The :attribute must have between :min and :max items.", - ), + ], "boolean" => "The :attribute field must be true or false", "confirmed" => "The :attribute confirmation does not match.", "date" => "The :attribute is not a valid date.", @@ -41,19 +41,19 @@ "in" => "The selected :attribute is invalid.", "integer" => "The :attribute must be an integer.", "ip" => "The :attribute must be a valid IP address.", - "max" => array( + "max" => [ "numeric" => "The :attribute may not be greater than :max.", "file" => "The :attribute may not be greater than :max kilobytes.", "string" => "The :attribute may not be greater than :max characters.", "array" => "The :attribute may not have more than :max items.", - ), + ], "mimes" => "The :attribute must be a file of type: :values.", - "min" => array( + "min" => [ "numeric" => "The :attribute must be at least :min.", "file" => "The :attribute must be at least :min kilobytes.", "string" => "The :attribute must be at least :min characters.", "array" => "The :attribute must have at least :min items.", - ), + ], "not_in" => "The selected :attribute is invalid.", "numeric" => "The :attribute must be a number.", "regex" => "The :attribute format is invalid.", @@ -64,12 +64,12 @@ "required_without" => "The :attribute field is required when :values is not present.", "required_without_all" => "The :attribute field is required when none of :values are present.", "same" => "The :attribute and :other must match.", - "size" => array( + "size" => [ "numeric" => "The :attribute must be :size.", "file" => "The :attribute must be :size kilobytes.", "string" => "The :attribute must be :size characters.", "array" => "The :attribute must contain :size items.", - ), + ], "unique" => "The :attribute has already been taken.", "url" => "The :attribute format is invalid.", "timezone" => "The :attribute must be a valid zone.", @@ -85,11 +85,11 @@ | */ - 'custom' => array( - 'attribute-name' => array( + 'custom' => [ + 'attribute-name' => [ 'rule-name' => 'custom-message', - ), - ), + ], + ], /* |-------------------------------------------------------------------------- @@ -102,6 +102,6 @@ | */ - 'attributes' => array(), + 'attributes' => [], -); +]; From c9ea1cbf03a692877932f9e74733d6cadc983761 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 28 Aug 2014 14:47:08 +0200 Subject: [PATCH 64/82] Fix doc blocks. --- app/Providers/ErrorServiceProvider.php | 2 -- app/Providers/LogServiceProvider.php | 1 - 2 files changed, 3 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 52052ddea54..1b4b3fe6520 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -8,8 +8,6 @@ class ErrorServiceProvider extends ServiceProvider { /** * Register any error handlers. * - * @param Handler $handler - * @param Log $log * @return void */ public function boot() diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index 12d4855b88f..acdd1c2e38e 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -8,7 +8,6 @@ class LogServiceProvider extends ServiceProvider { /** * Configure the application's logging facilities. * - * @param Log $log * @return void */ public function boot() From 45f0b4f9d9f7919ebba52fb511d48c931df7755c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 28 Aug 2014 15:00:43 +0200 Subject: [PATCH 65/82] Use injection here. Blah, can't decide. --- app/Providers/ErrorServiceProvider.php | 12 ++++++++---- app/Providers/LogServiceProvider.php | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 1b4b3fe6520..8d8801a1b94 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -1,16 +1,20 @@ error(function(Exception $e) use ($log) { - Log::error($e); + $log->error($e); }); } diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index acdd1c2e38e..cba36039a9b 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -1,6 +1,6 @@ useFiles(storage_path().'/logs/laravel.log'); } /** From 2f998b209545320686397c5d8c21cf24aa08fce8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 29 Aug 2014 00:21:49 +0200 Subject: [PATCH 66/82] Settle on Facades in service providers. --- app/Providers/ErrorServiceProvider.php | 12 ++++-------- app/Providers/LogServiceProvider.php | 7 +++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 8d8801a1b94..1b4b3fe6520 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -1,20 +1,16 @@ error(function(Exception $e) use ($log) + App::error(function(Exception $e) { - $log->error($e); + Log::error($e); }); } diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index cba36039a9b..acdd1c2e38e 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -1,6 +1,6 @@ useFiles(storage_path().'/logs/laravel.log'); + Log::useFiles(storage_path().'/logs/laravel.log'); } /** From a7f3512743ac36a398c42d4ef433ca611b322937 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 29 Aug 2014 04:18:29 +0200 Subject: [PATCH 67/82] Set root controller namespace. --- app/Providers/RouteServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 2e7465550ba..3e9df5ca6e9 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -14,7 +14,9 @@ class RouteServiceProvider extends ServiceProvider { */ public function before() { - // + URL::setRootControllerNamespace( + trim(config('namespaces.controller'), '\\') + ); } /** From 6fe851cc0a956bce9897e3ddaf692f4475e3d1b9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 29 Aug 2014 04:54:40 +0200 Subject: [PATCH 68/82] Import facade. --- app/Providers/RouteServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 3e9df5ca6e9..738d3b7fe46 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,6 +1,6 @@ Date: Fri, 29 Aug 2014 13:58:51 +0200 Subject: [PATCH 69/82] Extend model. --- app/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/User.php b/app/User.php index 31de77d8c5b..888696e2e60 100644 --- a/app/User.php +++ b/app/User.php @@ -1,12 +1,12 @@ Date: Fri, 29 Aug 2014 15:53:01 +0200 Subject: [PATCH 70/82] Use working directory. --- config/filesystems.php | 2 +- storage/work/.gitkeep | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 storage/work/.gitkeep diff --git a/config/filesystems.php b/config/filesystems.php index 6b57e3b6c93..36394709b7a 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -45,7 +45,7 @@ 'local' => [ 'driver' => 'local', - 'root' => base_path(), + 'root' => storage_path().'/work', ], 's3' => [ diff --git a/storage/work/.gitkeep b/storage/work/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d From 2b04647bb72f861e2d4c6c286b05220d586081c0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 30 Aug 2014 12:00:25 +0200 Subject: [PATCH 71/82] Remove a few providers. --- config/app.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/app.php b/config/app.php index e9cf25386c7..fcff65c21d7 100644 --- a/config/app.php +++ b/config/app.php @@ -116,16 +116,14 @@ 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', - 'Illuminate\Foundation\Providers\FormRequestServiceProvider', + 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Log\LogServiceProvider', 'Illuminate\Mail\MailServiceProvider', - 'Illuminate\Database\MigrationServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Auth\Reminders\ReminderServiceProvider', - 'Illuminate\Database\SeedServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', From 2ddf39f29ff1d82e69914318868884af7b24f8ef Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sun, 31 Aug 2014 17:13:44 +0200 Subject: [PATCH 72/82] Remove classes from aliases list Eloquent and Seeder were used to extend from which is a bad practice. The SoftDeletingTrait should be imported just like the UserTrait and the RemindableTrait. Str was also removed because it's just a shortcut for the namespace. People can always re-add it if they like. I wasn't entirely sure what FormRequest was doing here but I have a feeling it's going to be used for the same reasons as one of the above classes. So I removed it as well. --- config/app.php | 63 ++++++++++++++----------------- database/seeds/DatabaseSeeder.php | 2 + 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/config/app.php b/config/app.php index e9cf25386c7..6341058b837 100644 --- a/config/app.php +++ b/config/app.php @@ -159,40 +159,35 @@ 'aliases' => [ - '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', - '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', - 'FormRequest' => 'Illuminate\Foundation\Http\FormRequest', - 'Hash' => 'Illuminate\Support\Facades\Hash', - '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', - 'Str' => 'Illuminate\Support\Str', - 'URL' => 'Illuminate\Support\Facades\URL', - 'Validator' => 'Illuminate\Support\Facades\Validator', - 'View' => 'Illuminate\Support\Facades\View', + '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', + 'Cookie' => 'Illuminate\Support\Facades\Cookie', + 'Crypt' => 'Illuminate\Support\Facades\Crypt', + 'DB' => 'Illuminate\Support\Facades\DB', + 'Event' => 'Illuminate\Support\Facades\Event', + 'File' => 'Illuminate\Support\Facades\File', + 'Hash' => 'Illuminate\Support\Facades\Hash', + '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', + 'Session' => 'Illuminate\Support\Facades\Session', + 'URL' => 'Illuminate\Support\Facades\URL', + 'Validator' => 'Illuminate\Support\Facades\Validator', + 'View' => 'Illuminate\Support\Facades\View', ], diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 1989252073e..d959ef7277e 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,5 +1,7 @@ Date: Tue, 2 Sep 2014 19:29:26 +0930 Subject: [PATCH 73/82] Fix parameters for the AuthFilter. Signed-off-by: Jason Lewis --- app/Http/Filters/AuthFilter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Filters/AuthFilter.php b/app/Http/Filters/AuthFilter.php index bd512bb7f59..4cc37098839 100644 --- a/app/Http/Filters/AuthFilter.php +++ b/app/Http/Filters/AuthFilter.php @@ -1,6 +1,7 @@ Date: Tue, 2 Sep 2014 19:30:17 +0930 Subject: [PATCH 74/82] Update the docblock for the CsrfFilter. Signed-off-by: Jason Lewis --- app/Http/Filters/CsrfFilter.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Filters/CsrfFilter.php b/app/Http/Filters/CsrfFilter.php index c6ee7696e16..6056f9eeaf1 100644 --- a/app/Http/Filters/CsrfFilter.php +++ b/app/Http/Filters/CsrfFilter.php @@ -10,7 +10,11 @@ class CsrfFilter { /** * Run the request filter. * - * @return mixed + * @param \Illuminate\Routing\Route $route + * @param \Illuminate\Http\Request $request + * @return void + * + * @throws \Illuminate\Session\TokenMismatchException */ public function filter(Route $route, Request $request) { @@ -20,4 +24,4 @@ public function filter(Route $route, Request $request) } } -} \ No newline at end of file +} From c993970a0f61a5b870bfe726886c89f703f1b256 Mon Sep 17 00:00:00 2001 From: ajschmaltz Date: Tue, 2 Sep 2014 19:48:55 -0400 Subject: [PATCH 75/82] Spellcheck --- app/Console/InspireCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/InspireCommand.php b/app/Console/InspireCommand.php index 777b2f4ec67..326caa1dd1a 100644 --- a/app/Console/InspireCommand.php +++ b/app/Console/InspireCommand.php @@ -19,7 +19,7 @@ class InspireCommand extends Command { * * @var string */ - protected $description = 'Display an inpiring quote'; + protected $description = 'Display an inspiring quote'; /** * Create a new command instance. From c3c93cf95b520c0e715632fb9307b9a76f675650 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Sep 2014 09:55:12 +0200 Subject: [PATCH 76/82] Updated Eloquent to Eloquent\Model --- database/seeds/DatabaseSeeder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index d959ef7277e..b3c69b56e85 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,6 +1,7 @@ call('UserTableSeeder'); } From 5eaaadc204779a4c3d2407800c70a421a5ce376a Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Sun, 7 Sep 2014 09:20:07 -0400 Subject: [PATCH 77/82] [bug] Auth filter still redirects to /login not auth/login if you use make:auth it defaults to auth/login for a path. But if you look at the Auth filter it defaults to /login as a path. --- app/Http/Filters/AuthFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Filters/AuthFilter.php b/app/Http/Filters/AuthFilter.php index 4cc37098839..0bf83ab26ed 100644 --- a/app/Http/Filters/AuthFilter.php +++ b/app/Http/Filters/AuthFilter.php @@ -23,7 +23,7 @@ public function filter(Route $route, Request $request) } else { - return Redirect::guest('login'); + return Redirect::guest('auth/login'); } } } From dd42bef809f1a73468830dbffdaa495ee43c2af1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 7 Sep 2014 12:05:59 -0500 Subject: [PATCH 78/82] Working on read me. --- readme.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 40ea7eeadf2..5e2913cad94 100644 --- a/readme.md +++ b/readme.md @@ -6,9 +6,7 @@ [![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) [![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. - -Laravel aims to make the development process a pleasing one for the developer without sacrificing application functionality. Happy developers make the best code. To this end, we've attempted to combine the very best of what we have seen in other web frameworks, including frameworks implemented in other languages, such as Ruby on Rails, ASP.NET MVC, and Sinatra. +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. @@ -18,7 +16,7 @@ Documentation for the entire framework can be found on the [Laravel website](htt ### Contributing To Laravel -**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.** +**All framework pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.** ### License From 1f738b12b3510e324e06647e443d0d919c4e6185 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Sep 2014 10:19:24 -0500 Subject: [PATCH 79/82] Fix readme. --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 5e2913cad94..a4d8d553cb0 100644 --- a/readme.md +++ b/readme.md @@ -12,11 +12,11 @@ Laravel is accessible, yet powerful, providing powerful tools needed for large, ## Official Documentation -Documentation for the entire framework can be found on the [Laravel website](http://laravel.com/docs). +Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). -### Contributing To Laravel +## Contributing -**All framework pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.** +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). ### License From eff1f84050c9e2711ce552000d24a47e7482c06d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 9 Sep 2014 10:01:59 -0500 Subject: [PATCH 80/82] Remove extra lines. --- app/Providers/ErrorServiceProvider.php | 1 - app/Providers/RouteServiceProvider.php | 1 - 2 files changed, 2 deletions(-) diff --git a/app/Providers/ErrorServiceProvider.php b/app/Providers/ErrorServiceProvider.php index 1b4b3fe6520..852cdd4b225 100644 --- a/app/Providers/ErrorServiceProvider.php +++ b/app/Providers/ErrorServiceProvider.php @@ -17,7 +17,6 @@ public function boot() // 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. - App::error(function(Exception $e) { Log::error($e); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 738d3b7fe46..458347c1851 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -31,7 +31,6 @@ public function map() // Once the application has booted, we will include the default routes // file. This "namespace" helper will load the routes file within a // route group which automatically sets the controller namespace. - $this->namespaced(function() { require app_path().'/Http/routes.php'; From 13d19d606dec15786424ec46dd7512f9a77e1965 Mon Sep 17 00:00:00 2001 From: Julien Bonvarlet Date: Fri, 12 Sep 2014 17:22:09 +0200 Subject: [PATCH 81/82] Fix dependency With this new 5.0 branch, there is some issues on composer install. Either keep a 4.3.* branch or change this ? --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8da76d6a02b..34def2f72d2 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "laravel/framework": "4.3.*" + "laravel/framework": "~5.0" }, "require-dev": { "phpunit/phpunit": "~4.0" From 78e9697127c0bcdea09451270a6569e4c81dc34b Mon Sep 17 00:00:00 2001 From: Christoffer Palm Date: Sun, 14 Sep 2014 17:31:51 +0200 Subject: [PATCH 82/82] File input and the new request object --- .idea/scopes/scope_settings.xml | 5 + .idea/workspace.xml | 425 ++++++++++++++++++++++++ app/Http/Controllers/HomeController.php | 14 + app/Http/Requests/FileInputRequest.php | 27 ++ app/Http/routes.php | 4 + bootstrap/environment.php | 8 +- config/app.php | 23 +- liferaft.md | 46 +++ resources/views/hello.php | 60 ++-- 9 files changed, 566 insertions(+), 46 deletions(-) create mode 100644 .idea/scopes/scope_settings.xml create mode 100644 .idea/workspace.xml create mode 100644 app/Http/Requests/FileInputRequest.php create mode 100644 liferaft.md diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 00000000000..922003b8433 --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000000..ff151696bbe --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1410699471401 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f934c007407..4388b8a2d5e 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,5 +1,6 @@ all()); + } + + public function postWithout() + { + print('Post without the request object:'); + + dd(\Input::all()); + } } diff --git a/app/Http/Requests/FileInputRequest.php b/app/Http/Requests/FileInputRequest.php new file mode 100644 index 00000000000..f717a175893 --- /dev/null +++ b/app/Http/Requests/FileInputRequest.php @@ -0,0 +1,27 @@ +detectEnvironment([ - - 'local' => ['homestead'], - -]); +$env = $app->detectEnvironment(function() { + return 'local'; +}); diff --git a/config/app.php b/config/app.php index 5c41817c965..ccff217241a 100644 --- a/config/app.php +++ b/config/app.php @@ -13,7 +13,7 @@ | */ - 'debug' => false, + 'debug' => true, /* |-------------------------------------------------------------------------- @@ -26,7 +26,7 @@ | */ - 'url' => 'http://localhost', + 'url' => 'http://laravel.dev', /* |-------------------------------------------------------------------------- @@ -95,16 +95,6 @@ 'providers' => [ - /* - * Application Service Providers... - */ - 'App\Providers\AppServiceProvider', - 'App\Providers\ArtisanServiceProvider', - 'App\Providers\ErrorServiceProvider', - 'App\Providers\FilterServiceProvider', - 'App\Providers\LogServiceProvider', - 'App\Providers\RouteServiceProvider', - /* * Laravel Framework Service Providers... */ @@ -129,6 +119,15 @@ 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', + /* + * Application Service Providers... + */ + 'App\Providers\AppServiceProvider', + 'App\Providers\ArtisanServiceProvider', + 'App\Providers\ErrorServiceProvider', + 'App\Providers\FilterServiceProvider', + 'App\Providers\LogServiceProvider', + 'App\Providers\RouteServiceProvider', ], /* diff --git a/liferaft.md b/liferaft.md new file mode 100644 index 00000000000..144dfec58e3 --- /dev/null +++ b/liferaft.md @@ -0,0 +1,46 @@ +File input and the new request objects +=== + +When using the new request objects with file inputs result i weird problems. + +Go to the / route and there will be two forms for testing the same thing with +and without a request object. + +For some reason errors are not showing up on this installation for me, +I'm just getting blank pages. + +The issues showing up on this liferaft example is the same as i'm getting on +one of my other projects, there i get the following exception thrown when +submitting a form with an empty file input field: + +InvalidArgumentException thrown with message "An uploaded file must be an array or an instance of UploadedFile." + +Stacktrace: +#26 InvalidArgumentException in /home/vagrant/Code/jarvis/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php:59 +#25 Symfony\Component\HttpFoundation\FileBag:set in /home/vagrant/Code/jarvis/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php:73 +#24 Symfony\Component\HttpFoundation\FileBag:add in /home/vagrant/Code/jarvis/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php:48 +#23 Symfony\Component\HttpFoundation\FileBag:replace in /home/vagrant/Code/jarvis/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php:37 +#22 Symfony\Component\HttpFoundation\FileBag:__construct in /home/vagrant/Code/jarvis/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php:245 +#21 Symfony\Component\HttpFoundation\Request:initialize in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php:57 +#20 Illuminate\Foundation\Providers\FormRequestServiceProvider:initializeRequest in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php:35 +#19 Illuminate\Foundation\Providers\FormRequestServiceProvider:Illuminate\Foundation\Providers\{closure} in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Container/Container.php:839 +#18 Illuminate\Container\Container:fireCallbackArray in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Container/Container.php:824 +#17 Illuminate\Container\Container:fireResolvingCallbacks in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Container/Container.php:565 +#16 Illuminate\Container\Container:make in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:472 +#15 Illuminate\Foundation\Application:make in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php:55 +#14 Illuminate\Routing\ControllerDispatcher:resolveMethodDependencies in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php:34 +#13 Illuminate\Routing\ControllerDispatcher:resolveClassMethodDependencies in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:97 +#12 Illuminate\Routing\ControllerDispatcher:call in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:66 +#11 Illuminate\Routing\ControllerDispatcher:dispatch in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/Route.php:155 +#10 Illuminate\Routing\Route:dispatchToController in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/Route.php:129 +#9 Illuminate\Routing\Route:run in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1030 +#8 Illuminate\Routing\Router:dispatchToRoute in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Routing/Router.php:996 +#7 Illuminate\Routing\Router:dispatch in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:812 +#6 Illuminate\Foundation\Application:dispatch in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:789 +#5 Illuminate\Foundation\Application:handle in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Session/Middleware.php:72 +#4 Illuminate\Session\Middleware:handle in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php:47 +#3 Illuminate\Cookie\Queue:handle in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php:51 +#2 Illuminate\Cookie\Guard:handle in /home/vagrant/Code/jarvis/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23 +#1 Stack\StackedHttpKernel:handle in /home/vagrant/Code/jarvis/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:665 +#0 Illuminate\Foundation\Application:run in /home/vagrant/Code/jarvis/public/index.php:49 + diff --git a/resources/views/hello.php b/resources/views/hello.php index 648424217dc..ac27d041baf 100644 --- a/resources/views/hello.php +++ b/resources/views/hello.php @@ -4,39 +4,41 @@ Laravel PHP Framework -
- Laravel PHP Framework -

You have arrived.

-
+
    + all() as $error): ?> +
  • + +
+ +

Using the new request objects:

+

Posting this form with no input will yield a blank page, if the name is entered but no file is supplied it will still yield a blank page. Selecting a file will make it pass trough to to method woth both file and name input.

+ +
+
+
+
+
+ +
+ +
+ +

Without using a request object:

+

This form works fine any way. With a file, without a file and so on.

+ +
+
+
+
+
+ +