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 diff --git a/app/Http/routes.php b/app/Http/routes.php index a7c51594..1ad35497 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -2,10 +2,10 @@ /* |-------------------------------------------------------------------------- -| Routes File +| Application Routes |-------------------------------------------------------------------------- | -| Here is where you will register all of the routes in an application. +| 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 controller to call when that URI is requested. | @@ -14,18 +14,3 @@ Route::get('/', function () { return view('welcome'); }); - -/* -|-------------------------------------------------------------------------- -| Application Routes -|-------------------------------------------------------------------------- -| -| This route group applies the "web" middleware group to every route -| it contains. The "web" middleware group is defined in your HTTP -| kernel and includes session state, CSRF protection, and more. -| -*/ - -Route::group(['middleware' => ['web']], function () { - // -}); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index d50b1c0f..bde08819 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -8,7 +8,7 @@ use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvi 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,24 @@ class RouteServiceProvider extends ServiceProvider */ public function map(Router $router) { - $router->group(['namespace' => $this->namespace], function ($router) { + $this->mapWebRoutes($router); + + // + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @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'); }); } 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 */ diff --git a/composer.json b/composer.json index d643a601..7cbe672b 100644 --- a/composer.json +++ b/composer.json @@ -36,13 +36,11 @@ "php artisan key:generate" ], "post-install-cmd": [ - "php artisan clear-compiled", + "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], - "pre-update-cmd": [ - "php artisan clear-compiled" - ], "post-update-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, 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 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => database_path('database.sqlite'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], diff --git a/config/session.php b/config/session.php index f1b00421..b501055b 100644 --- a/config/session.php +++ b/config/session.php @@ -150,4 +150,17 @@ return [ '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, + ]; 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