From 4fec844eb957890eab7c94c5454e6e25ae103fe7 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Wed, 16 Mar 2016 08:37:44 +0100 Subject: [PATCH 01/13] Remove pre-update-cmd Can't rely on being able to run php artisan, before updating. --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index d216ea3a..f5166284 100644 --- a/composer.json +++ b/composer.json @@ -39,10 +39,8 @@ "php artisan clear-compiled", "php artisan optimize" ], - "pre-update-cmd": [ - "php artisan clear-compiled" - ], "post-update-cmd": [ + "php artisan clear-compiled", "php artisan optimize" ] }, From 4013369e28772b158af8d7138401fe2ea9490391 Mon Sep 17 00:00:00 2001 From: Kevin Simard Date: Thu, 17 Mar 2016 09:59:23 -0400 Subject: [PATCH 02/13] Ignore schedule files --- storage/framework/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore index 953edb7a..b02b700f 100644 --- a/storage/framework/.gitignore +++ b/storage/framework/.gitignore @@ -1,5 +1,6 @@ config.php routes.php +schedule-* compiled.php services.json events.scanned.php From 9234300833c0f23321510253a66d77fa7ada45df Mon Sep 17 00:00:00 2001 From: Guilherme de Oliveira Gonzaga Date: Thu, 17 Mar 2016 17:18:53 -0300 Subject: [PATCH 03/13] Update of the doc for equals to Model --- app/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/User.php b/app/User.php index ef6fe91e..75741ae4 100644 --- a/app/User.php +++ b/app/User.php @@ -16,7 +16,7 @@ class User extends Authenticatable ]; /** - * The attributes excluded from the model's JSON form. + * The attributes that should be hidden for arrays. * * @var array */ From 9d14fe2d7eab3bcb3ae582848ee91f24800cceda Mon Sep 17 00:00:00 2001 From: mzaalan Date: Mon, 21 Mar 2016 14:12:38 +0200 Subject: [PATCH 04/13] Set HttpOnly flag --- config/session.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/session.php b/config/session.php index f1b00421..fbe8084d 100644 --- a/config/session.php +++ b/config/session.php @@ -149,5 +149,6 @@ */ 'secure' => false, + 'http_only' => true, ]; From e52b1f71d56a068fd545e47141c72c91ff4eeaca Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 21 Mar 2016 09:13:22 -0500 Subject: [PATCH 05/13] fix wording --- config/session.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/session.php b/config/session.php index fbe8084d..b501055b 100644 --- a/config/session.php +++ b/config/session.php @@ -149,6 +149,18 @@ */ 'secure' => false, + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + 'http_only' => true, ]; From eb7743f57777afc0f7feccf68f98d1fcc093bf1e Mon Sep 17 00:00:00 2001 From: Matthias Niess Date: Mon, 21 Mar 2016 20:58:55 +0100 Subject: [PATCH 06/13] allow for setting sqlite database via env --- config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index def1e560..8451a62f 100644 --- a/config/database.php +++ b/config/database.php @@ -48,7 +48,7 @@ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => database_path('database.sqlite'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], From 1d5e88d0fb687d8ea57a85f9e5d11e7e63685ae2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 22 Mar 2016 13:49:35 -0500 Subject: [PATCH 07/13] update default routes file --- app/Http/routes.php | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index a7c51594..084f4c32 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -1,31 +1,20 @@ ['web']], function () { - // + + Route::get('/', function () { + return view('welcome'); + }); + }); From 40e5e164a91d12f6d95c2db74cbf592b85448fd6 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Wed, 23 Mar 2016 15:27:01 +0100 Subject: [PATCH 08/13] Use ComposerScripts Use ComposerScripts to avoid loading any configuration/compiled files. --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f5166284..4943e17d 100644 --- a/composer.json +++ b/composer.json @@ -36,11 +36,11 @@ "php artisan key:generate" ], "post-install-cmd": [ - "php artisan clear-compiled", + "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ - "php artisan clear-compiled", + "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, From 5c30c98db96459b4cc878d085490e4677b0b67ed Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Mar 2016 17:04:42 -0500 Subject: [PATCH 09/13] just use web group by default --- app/Http/routes.php | 8 ++------ app/Providers/RouteServiceProvider.php | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index 084f4c32..1ad35497 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -11,10 +11,6 @@ | */ -Route::group(['middleware' => ['web']], function () { - - Route::get('/', function () { - return view('welcome'); - }); - +Route::get('/', function () { + return view('welcome'); }); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index d50b1c0f..0d2e2241 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -8,7 +8,7 @@ class RouteServiceProvider extends ServiceProvider { /** - * This namespace is applied to the controller routes in your routes file. + * This namespace is applied to your controller routes. * * In addition, it is set as the URL generator's root namespace. * @@ -37,7 +37,22 @@ public function boot(Router $router) */ public function map(Router $router) { - $router->group(['namespace' => $this->namespace], function ($router) { + $this->mapWebRoutes($router); + + // + } + + /** + * Define the "web" routes for the application. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + protected function mapWebRoutes(Router $router) + { + $router->group([ + 'namespace' => $this->namespace, 'middleware' => 'web' + ], function ($router) { require app_path('Http/routes.php'); }); } From bcc54357bdb80c5ffcf41bdda222706b7aee5637 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Mar 2016 17:05:17 -0500 Subject: [PATCH 10/13] add to comment --- app/Providers/RouteServiceProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 0d2e2241..fa6fce54 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -45,6 +45,8 @@ public function map(Router $router) /** * Define the "web" routes for the application. * + * These routes all receive session state, CSRF protection, etc. + * * @param \Illuminate\Routing\Router $router * @return void */ From a77fa359d9fa9a974f4c3677a67fadf4299e8b6c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Mar 2016 18:05:18 -0400 Subject: [PATCH 11/13] Applied fixes from StyleCI --- 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 0d2e2241..ef44b809 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -51,7 +51,7 @@ public function map(Router $router) protected function mapWebRoutes(Router $router) { $router->group([ - 'namespace' => $this->namespace, 'middleware' => 'web' + 'namespace' => $this->namespace, 'middleware' => 'web', ], function ($router) { require app_path('Http/routes.php'); }); From e316be4cec21d284fdef1e45663f7ca6c4b42cc8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 23 Mar 2016 18:05:26 -0400 Subject: [PATCH 12/13] Applied fixes from StyleCI --- 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 fa6fce54..bde08819 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -53,7 +53,7 @@ public function map(Router $router) protected function mapWebRoutes(Router $router) { $router->group([ - 'namespace' => $this->namespace, 'middleware' => 'web' + 'namespace' => $this->namespace, 'middleware' => 'web', ], function ($router) { require app_path('Http/routes.php'); }); From fb0f915d4bdab84364b6cd304e8a8601f78e8be1 Mon Sep 17 00:00:00 2001 From: Michael Burton Date: Fri, 25 Mar 2016 11:53:57 +0000 Subject: [PATCH 13/13] Update .env.example add DB_CONNECTION as env variable - it is already checked for in config/database.php --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index 86aab15f..9a9d0dc7 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,7 @@ APP_DEBUG=true APP_KEY=SomeRandomString APP_URL=http://localhost +DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=homestead