Browse Source

Upgrade to Laravel 9

Bubka 2 years ago
parent
commit
0ac04a321d

+ 11 - 1
.gitattributes

@@ -1,5 +1,15 @@
 * text=auto
 * text=auto
-*.css linguist-vendored
+
+*.php diff=php
+*.md diff=markdown
+*.html diff=html
+*.css diff=css linguist-vendored
 *.scss linguist-vendored
 *.scss linguist-vendored
 *.js linguist-vendored
 *.js linguist-vendored
+*.sh linguist-vendored
+*.blade.php linguist-vendored
+Dockerfile linguist-vendored
+
+/.github export-ignore
 CHANGELOG.md export-ignore
 CHANGELOG.md export-ignore
+.styleci.yml export-ignore

+ 2 - 0
.gitignore

@@ -1,4 +1,5 @@
 /node_modules
 /node_modules
+/public/build
 /public/hot
 /public/hot
 /public/storage
 /public/storage
 /storage/*.key
 /storage/*.key
@@ -12,6 +13,7 @@
 .phpunit.result.cache
 .phpunit.result.cache
 Homestead.json
 Homestead.json
 Homestead.yaml
 Homestead.yaml
+auth.json
 npm-debug.log
 npm-debug.log
 yarn-error.log
 yarn-error.log
 _ide_helper.php
 _ide_helper.php

+ 0 - 2
.styleci.yml

@@ -1,12 +1,10 @@
 php:
 php:
   preset: laravel
   preset: laravel
-  version: 8
   disabled:
   disabled:
     - no_unused_imports
     - no_unused_imports
   finder:
   finder:
     not-name:
     not-name:
       - index.php
       - index.php
-      - server.php
 js:
 js:
   finder:
   finder:
     not-name:
     not-name:

+ 9 - 0
app/Exceptions/Handler.php

@@ -6,6 +6,15 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
 
 
 class Handler extends ExceptionHandler
 class Handler extends ExceptionHandler
 {
 {
+    /**
+     * A list of exception types with their corresponding custom log levels.
+     *
+     * @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
+     */
+    protected $levels = [
+        //
+    ];
+    
     /**
     /**
      * A list of the exception types that are not reported.
      * A list of the exception types that are not reported.
      *
      *

+ 6 - 2
app/Http/Kernel.php

@@ -14,8 +14,10 @@ class Kernel extends HttpKernel
      * @var array
      * @var array
      */
      */
     protected $middleware = [
     protected $middleware = [
+        // \App\Http\Middleware\TrustHosts::class,
         \App\Http\Middleware\TrustProxies::class,
         \App\Http\Middleware\TrustProxies::class,
-        \Fruitcake\Cors\HandleCors::class,
+        // \Fruitcake\Cors\HandleCors::class,
+        \Illuminate\Http\Middleware\HandleCors::class,
         // \App\Http\Middleware\CheckForMaintenanceMode::class,
         // \App\Http\Middleware\CheckForMaintenanceMode::class,
         \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
         \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
         \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
         \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
@@ -75,7 +77,9 @@ class Kernel extends HttpKernel
         'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
         'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
         'rejectIfDemoMode' => \App\Http\Middleware\RejectIfDemoMode::class,
         'rejectIfDemoMode' => \App\Http\Middleware\RejectIfDemoMode::class,
         'rejectIfReverseProxy' => \App\Http\Middleware\RejectIfReverseProxy::class,
         'rejectIfReverseProxy' => \App\Http\Middleware\RejectIfReverseProxy::class,
-        
+        'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
+        // 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
+        // 'signed' => \App\Http\Middleware\ValidateSignature::class,
     ];
     ];
 
 
     /**
     /**

+ 20 - 0
app/Http/Middleware/TrustHosts.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Http\Middleware\TrustHosts as Middleware;
+
+class TrustHosts extends Middleware
+{
+    /**
+     * Get the host patterns that should be trusted.
+     *
+     * @return array<int, string|null>
+     */
+    public function hosts()
+    {
+        return [
+            $this->allSubdomainsOfApplicationUrl(),
+        ];
+    }
+}

+ 22 - 0
app/Http/Middleware/ValidateSignature.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
+
+class ValidateSignature extends Middleware
+{
+    /**
+     * The names of the query string parameters that should be ignored.
+     *
+     * @var array<int, string>
+     */
+    protected $except = [
+        // 'fbclid',
+        // 'utm_campaign',
+        // 'utm_content',
+        // 'utm_medium',
+        // 'utm_source',
+        // 'utm_term',
+    ];
+}

+ 1 - 1
artisan

@@ -11,7 +11,7 @@ define('LARAVEL_START', microtime(true));
 | Composer provides a convenient, automatically generated class loader
 | Composer provides a convenient, automatically generated class loader
 | for our application. We just need to utilize it! We'll require it
 | for our application. We just need to utilize it! We'll require it
 | into the script here so that we do not have to worry about the
 | into the script here so that we do not have to worry about the
-| loading of any our classes "manually". Feels great to relax.
+| loading of any of our classes manually. It's great to relax.
 |
 |
 */
 */
 
 

+ 9 - 9
composer.json

@@ -8,7 +8,7 @@
     ],
     ],
     "license": "MIT",
     "license": "MIT",
     "require": {
     "require": {
-        "php": "^8.0",
+        "php": "^8.0.2",
         "ext-bcmath": "*",
         "ext-bcmath": "*",
         "ext-ctype": "*",
         "ext-ctype": "*",
         "ext-dom": "*",
         "ext-dom": "*",
@@ -23,14 +23,14 @@
         "chillerlan/php-qrcode": "^4.3",
         "chillerlan/php-qrcode": "^4.3",
         "darkghosthunter/larapass": "^3.0.2",
         "darkghosthunter/larapass": "^3.0.2",
         "doctormckay/steam-totp": "^1.0",
         "doctormckay/steam-totp": "^1.0",
-        "doctrine/dbal": "^3.3",
+        "doctrine/dbal": "^3.4",
         "fruitcake/laravel-cors": "^2.0",
         "fruitcake/laravel-cors": "^2.0",
         "google/protobuf": "^3.21",
         "google/protobuf": "^3.21",
-        "guzzlehttp/guzzle": "^7.0.1",
+        "guzzlehttp/guzzle": "^7.2",
         "khanamiryan/qrcode-detector-decoder": "^1.0.5",
         "khanamiryan/qrcode-detector-decoder": "^1.0.5",
-        "laravel/framework": "^8.0",
-        "laravel/passport": "^10.0",
-        "laravel/tinker": "^2.5",
+        "laravel/framework": "^9.0",
+        "laravel/passport": "^11.2",
+        "laravel/tinker": "^2.7",
         "laravel/ui": "^3.0",
         "laravel/ui": "^3.0",
         "paragonie/constant_time_encoding": "^2.6",
         "paragonie/constant_time_encoding": "^2.6",
         "spatie/eloquent-sortable": "^4.0.1",
         "spatie/eloquent-sortable": "^4.0.1",
@@ -38,11 +38,11 @@
     },
     },
     "require-dev": {
     "require-dev": {
         "barryvdh/laravel-ide-helper": "^2.12",
         "barryvdh/laravel-ide-helper": "^2.12",
-        "facade/ignition": "^2.3.6",
+        "spatie/laravel-ignition": "^1.0",
         "fakerphp/faker": "^1.20",
         "fakerphp/faker": "^1.20",
         "mockery/mockery": "^1.5",
         "mockery/mockery": "^1.5",
-        "nunomaduro/collision": "^5.0",
-        "nunomaduro/larastan": "^1.0",
+        "nunomaduro/collision": "^6.1",
+        "nunomaduro/larastan": "^2.0",
         "phpstan/phpstan": "^1.8",
         "phpstan/phpstan": "^1.8",
         "phpunit/phpunit": "^9.5"
         "phpunit/phpunit": "^9.5"
     },
     },

+ 22 - 41
config/app.php

@@ -1,5 +1,7 @@
 <?php
 <?php
 
 
+use Illuminate\Support\Facades\Facade;
+
 return [
 return [
 
 
     /*
     /*
@@ -123,6 +125,24 @@ return [
 
 
     'cipher' => 'AES-256-CBC',
     'cipher' => 'AES-256-CBC',
 
 
+    /*
+    |--------------------------------------------------------------------------
+    | Maintenance Mode Driver
+    |--------------------------------------------------------------------------
+    |
+    | These configuration options determine the driver used to determine and
+    | manage Laravel's "maintenance mode" status. The "cache" driver will
+    | allow maintenance mode to be controlled across multiple machines.
+    |
+    | Supported drivers: "file", "cache"
+    |
+    */
+
+    'maintenance' => [
+        'driver' => 'file',
+        // 'store'  => 'redis',
+    ],
+
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     | Autoloaded Service Providers
     | Autoloaded Service Providers
@@ -189,50 +209,11 @@ return [
     |
     |
     */
     */
 
 
-    'aliases' => [
-
-        'App' => Illuminate\Support\Facades\App::class,
-        'Arr' => Illuminate\Support\Arr::class,
-        'Artisan' => Illuminate\Support\Facades\Artisan::class,
-        'Auth' => Illuminate\Support\Facades\Auth::class,
-        'Blade' => Illuminate\Support\Facades\Blade::class,
-        'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
-        'Bus' => Illuminate\Support\Facades\Bus::class,
-        'Cache' => Illuminate\Support\Facades\Cache::class,
-        'Config' => Illuminate\Support\Facades\Config::class,
-        'Cookie' => Illuminate\Support\Facades\Cookie::class,
-        'Crypt' => Illuminate\Support\Facades\Crypt::class,
-        'Date' => Illuminate\Support\Facades\Date::class,
-        'DB' => Illuminate\Support\Facades\DB::class,
-        'Eloquent' => Illuminate\Database\Eloquent\Model::class,
-        'Event' => Illuminate\Support\Facades\Event::class,
-        'File' => Illuminate\Support\Facades\File::class,
-        'Gate' => Illuminate\Support\Facades\Gate::class,
-        'Hash' => Illuminate\Support\Facades\Hash::class,
-        'Http' => Illuminate\Support\Facades\Http::class,
-        'Js' => Illuminate\Support\Js::class,
-        'Lang' => Illuminate\Support\Facades\Lang::class,
-        'Log' => Illuminate\Support\Facades\Log::class,
-        'Mail' => Illuminate\Support\Facades\Mail::class,
-        'Notification' => Illuminate\Support\Facades\Notification::class,
-        'Password' => Illuminate\Support\Facades\Password::class,
-        'Queue' => Illuminate\Support\Facades\Queue::class,
-        'Redirect' => Illuminate\Support\Facades\Redirect::class,
-        // 'Redis' => Illuminate\Support\Facades\Redis::class,
-        'Request' => Illuminate\Support\Facades\Request::class,
-        'Response' => Illuminate\Support\Facades\Response::class,
-        'Route' => Illuminate\Support\Facades\Route::class,
-        'Schema' => Illuminate\Support\Facades\Schema::class,
-        'Session' => Illuminate\Support\Facades\Session::class,
-        'Storage' => Illuminate\Support\Facades\Storage::class,
-        'Str' => Illuminate\Support\Str::class,
-        'URL' => Illuminate\Support\Facades\URL::class,
-        'Validator' => Illuminate\Support\Facades\Validator::class,
-        'View' => Illuminate\Support\Facades\View::class,
+    'aliases' => Facade::defaultAliases()->merge([
         'QrCode' => App\Facades\QrCode::class,
         'QrCode' => App\Facades\QrCode::class,
         'Groups' => App\Facades\Groups::class,
         'Groups' => App\Facades\Groups::class,
         'TwoFAccounts' => App\Facades\TwoFAccounts::class,
         'TwoFAccounts' => App\Facades\TwoFAccounts::class,
         'Helpers' => App\Helpers\Helpers::class,
         'Helpers' => App\Helpers\Helpers::class,
-    ],
+    ])->toArray(),
 
 
 ];
 ];

+ 2 - 2
config/auth.php

@@ -46,7 +46,7 @@ return [
     | users are actually retrieved out of your database or other storage
     | users are actually retrieved out of your database or other storage
     | mechanisms used by this application to persist your user's data.
     | mechanisms used by this application to persist your user's data.
     |
     |
-    | Supported: "session", "token"
+    | Supported: "session"
     |
     |
     */
     */
 
 
@@ -105,7 +105,7 @@ return [
     | than one user table or model in the application and you want to have
     | than one user table or model in the application and you want to have
     | separate password reset settings based on the specific user types.
     | separate password reset settings based on the specific user types.
     |
     |
-    | The expire time is the number of minutes that the reset token should be
+    | The expire time is the number of minutes that each reset token will be
     | considered valid. This security feature keeps tokens short-lived so
     | considered valid. This security feature keeps tokens short-lived so
     | they have less time to be guessed. You may change this as needed.
     | they have less time to be guessed. You may change this as needed.
     |
     |

+ 8 - 2
config/broadcasting.php

@@ -11,7 +11,7 @@ return [
     | framework when an event needs to be broadcast. You may set this to
     | framework when an event needs to be broadcast. You may set this to
     | any of the connections defined in the "connections" array below.
     | any of the connections defined in the "connections" array below.
     |
     |
-    | Supported: "pusher", "redis", "log", "null"
+    | Supported: "pusher", "ably", "redis", "log", "null"
     |
     |
     */
     */
 
 
@@ -36,8 +36,14 @@ return [
             'secret' => env('PUSHER_APP_SECRET'),
             'secret' => env('PUSHER_APP_SECRET'),
             'app_id' => env('PUSHER_APP_ID'),
             'app_id' => env('PUSHER_APP_ID'),
             'options' => [
             'options' => [
-                'cluster' => env('PUSHER_APP_CLUSTER'),
+                'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
+                'port' => env('PUSHER_PORT', 443),
+                'scheme' => env('PUSHER_SCHEME', 'https'),
                 'encrypted' => true,
                 'encrypted' => true,
+                'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
+            ],
+            'client_options' => [
+                // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
             ],
             ],
         ],
         ],
 
 

+ 4 - 4
config/cache.php

@@ -99,12 +99,12 @@ return [
     | Cache Key Prefix
     | Cache Key Prefix
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     |
     |
-    | When utilizing a RAM based store such as APC or Memcached, there might
-    | be other applications utilizing the same cache. So, we'll specify a
-    | value to get prefixed to all our keys so we can avoid collisions.
+    | When utilizing the APC, database, memcached, Redis, or DynamoDB cache
+    | stores there might be other applications using the same cache. For
+    | that reason, you may prefix every cache key to avoid collisions.
     |
     |
     */
     */
 
 
-    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
+    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
 
 
 ];
 ];

+ 1 - 1
config/cors.php

@@ -15,7 +15,7 @@ return [
     |
     |
     */
     */
 
 
-    'paths' => ['api/*'],
+    'paths' => ['api/*', 'sanctum/csrf-cookie'],
     'allowed_methods' => ['*'],
     'allowed_methods' => ['*'],
     'allowed_origins' => ['*'],
     'allowed_origins' => ['*'],
     'allowed_origins_patterns' => [],
     'allowed_origins_patterns' => [],

+ 11 - 6
config/database.php

@@ -81,7 +81,7 @@ return [
             'charset' => 'utf8',
             'charset' => 'utf8',
             'prefix' => '',
             'prefix' => '',
             'prefix_indexes' => true,
             'prefix_indexes' => true,
-            'schema' => 'public',
+            'search_path' => 'public',
             'sslmode' => 'prefer',
             'sslmode' => 'prefer',
         ],
         ],
 
 
@@ -96,6 +96,8 @@ return [
             'charset' => 'utf8',
             'charset' => 'utf8',
             'prefix' => '',
             'prefix' => '',
             'prefix_indexes' => true,
             'prefix_indexes' => true,
+            // 'encrypt' => env('DB_ENCRYPT', 'yes'),
+            // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
         ],
         ],
 
 
     ],
     ],
@@ -126,24 +128,27 @@ return [
 
 
     'redis' => [
     'redis' => [
 
 
-        'client' => env('REDIS_CLIENT', 'predis'),
+        'client' => env('REDIS_CLIENT', 'phpredis'),
 
 
         'options' => [
         'options' => [
-            'cluster' => env('REDIS_CLUSTER', 'predis'),
-            'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
+            'cluster' => env('REDIS_CLUSTER', 'redis'),
+            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
         ],
         ],
 
 
         'default' => [
         'default' => [
             'url' => env('REDIS_URL'),
             'url' => env('REDIS_URL'),
             'host' => env('REDIS_HOST', '127.0.0.1'),
             'host' => env('REDIS_HOST', '127.0.0.1'),
-            'password' => env('REDIS_PASSWORD', null),
+            'username' => env('REDIS_USERNAME'),
+            'password' => env('REDIS_PASSWORD'),
             'port' => env('REDIS_PORT', '6379'),
             'port' => env('REDIS_PORT', '6379'),
             'database' => env('REDIS_DB', '0'),
             'database' => env('REDIS_DB', '0'),
         ],
         ],
 
 
         'cache' => [
         'cache' => [
+            'url' => env('REDIS_URL'),
             'host' => env('REDIS_HOST', '127.0.0.1'),
             'host' => env('REDIS_HOST', '127.0.0.1'),
-            'password' => env('REDIS_PASSWORD', null),
+            'username' => env('REDIS_USERNAME'),
+            'password' => env('REDIS_PASSWORD'),
             'port' => env('REDIS_PORT', '6379'),
             'port' => env('REDIS_PORT', '6379'),
             'database' => env('REDIS_CACHE_DB', '1'),
             'database' => env('REDIS_CACHE_DB', '1'),
         ],
         ],

+ 8 - 15
config/filesystems.php

@@ -15,19 +15,6 @@ return [
 
 
     'default' => env('FILESYSTEM_DRIVER', 'local'),
     'default' => env('FILESYSTEM_DRIVER', '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 bound as the Cloud disk implementation in the container.
-    |
-    */
-
-    // 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
-
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     | Filesystem Disks
     | Filesystem Disks
@@ -35,9 +22,9 @@ return [
     |
     |
     | Here you may configure as many filesystem "disks" as you wish, and you
     | Here you may configure as many filesystem "disks" as you wish, and you
     | may even configure multiple disks of the same driver. Defaults have
     | may even configure multiple disks of the same driver. Defaults have
-    | been setup for each driver as an example of the required options.
+    | been set up for each driver as an example of the required values.
     |
     |
-    | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
+    | Supported Drivers: "local", "ftp", "sftp", "s3"
     |
     |
     */
     */
 
 
@@ -46,6 +33,7 @@ return [
         'local' => [
         'local' => [
             'driver' => 'local',
             'driver' => 'local',
             'root' => storage_path('app'),
             'root' => storage_path('app'),
+            'throw' => false,
         ],
         ],
 
 
         'icons' => [
         'icons' => [
@@ -53,16 +41,19 @@ return [
             'root' => storage_path('app/public/icons'),
             'root' => storage_path('app/public/icons'),
             'url' => env('APP_URL').'/storage/icons',
             'url' => env('APP_URL').'/storage/icons',
             'visibility' => 'public',
             'visibility' => 'public',
+            'throw' => false,
         ],
         ],
 
 
         'logos' => [
         'logos' => [
             'driver' => 'local',
             'driver' => 'local',
             'root' => storage_path('app/logos'),
             'root' => storage_path('app/logos'),
+            'throw' => false,
         ],
         ],
 
 
         'imagesLink' => [
         'imagesLink' => [
             'driver' => 'local',
             'driver' => 'local',
             'root' => storage_path('app/imagesLink'),
             'root' => storage_path('app/imagesLink'),
+            'throw' => false,
         ],
         ],
 
 
         'public' => [
         'public' => [
@@ -70,6 +61,7 @@ return [
             'root' => storage_path('app/public'),
             'root' => storage_path('app/public'),
             'url' => env('APP_URL').'/storage',
             'url' => env('APP_URL').'/storage',
             'visibility' => 'public',
             'visibility' => 'public',
+            'throw' => false,
         ],
         ],
 
 
         's3' => [
         's3' => [
@@ -81,6 +73,7 @@ return [
             'url' => env('AWS_URL'),
             'url' => env('AWS_URL'),
             'endpoint' => env('AWS_ENDPOINT'),
             'endpoint' => env('AWS_ENDPOINT'),
             'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
             'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
+            'throw' => false,
         ],
         ],
 
 
     ],
     ],

+ 3 - 3
config/hashing.php

@@ -44,9 +44,9 @@ return [
     */
     */
 
 
     'argon' => [
     'argon' => [
-        'memory' => 1024,
-        'threads' => 2,
-        'time' => 2,
+        'memory' => 65536,
+        'threads' => 1,
+        'time' => 4,
     ],
     ],
 
 
 ];
 ];

+ 6 - 2
config/logging.php

@@ -30,7 +30,10 @@ return [
     |
     |
     */
     */
 
 
-    'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
+    'deprecations' => [
+        'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
+        'trace' => false,
+    ],
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
@@ -78,10 +81,11 @@ return [
         'papertrail' => [
         'papertrail' => [
             'driver' => 'monolog',
             'driver' => 'monolog',
             'level' => env('LOG_LEVEL', 'debug'),
             'level' => env('LOG_LEVEL', 'debug'),
-            'handler' => SyslogUdpHandler::class,
+            'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
             'handler_with' => [
             'handler_with' => [
                 'host' => env('PAPERTRAIL_URL'),
                 'host' => env('PAPERTRAIL_URL'),
                 'port' => env('PAPERTRAIL_PORT'),
                 'port' => env('PAPERTRAIL_PORT'),
+                'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
             ],
             ],
         ],
         ],
 
 

+ 2 - 2
config/mail.php

@@ -42,7 +42,7 @@ return [
             'username' => env('MAIL_USERNAME'),
             'username' => env('MAIL_USERNAME'),
             'password' => env('MAIL_PASSWORD'),
             'password' => env('MAIL_PASSWORD'),
             'timeout' => null,
             'timeout' => null,
-            'auth_mode' => null,
+            'local_domain' => env('MAIL_EHLO_DOMAIN'),
         ],
         ],
 
 
         'ses' => [
         'ses' => [
@@ -59,7 +59,7 @@ return [
 
 
         'sendmail' => [
         'sendmail' => [
             'transport' => 'sendmail',
             'transport' => 'sendmail',
-            'path' => '/usr/sbin/sendmail -bs',
+            'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
         ],
         ],
 
 
         'log' => [
         'log' => [

+ 1 - 1
config/queue.php

@@ -56,7 +56,7 @@ return [
             'key' => env('AWS_ACCESS_KEY_ID'),
             'key' => env('AWS_ACCESS_KEY_ID'),
             'secret' => env('AWS_SECRET_ACCESS_KEY'),
             'secret' => env('AWS_SECRET_ACCESS_KEY'),
             'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
             'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
-            'queue' => env('SQS_QUEUE', 'your-queue-name'),
+            'queue' => env('SQS_QUEUE', 'default'),
             'suffix' => env('SQS_SUFFIX'),
             'suffix' => env('SQS_SUFFIX'),
             'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
             'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
             'after_commit' => false,
             'after_commit' => false,

+ 4 - 17
config/services.php

@@ -8,9 +8,9 @@ return [
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     |
     |
     | This file is for storing the credentials for third party services such
     | This file is for storing the credentials for third party services such
-    | as Stripe, Mailgun, SparkPost and others. This file provides a sane
-    | default location for this type of information, allowing packages
-    | to have a conventional place to find your various credentials.
+    | as Mailgun, Postmark, AWS and more. This file provides the de facto
+    | location for this type of information, allowing packages to have
+    | a conventional file to locate the various service credentials.
     |
     |
     */
     */
 
 
@@ -18,6 +18,7 @@ return [
         'domain' => env('MAILGUN_DOMAIN'),
         'domain' => env('MAILGUN_DOMAIN'),
         'secret' => env('MAILGUN_SECRET'),
         'secret' => env('MAILGUN_SECRET'),
         'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
         'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+        'scheme' => 'https',
     ],
     ],
 
 
     'postmark' => [
     'postmark' => [
@@ -30,18 +31,4 @@ return [
         'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
         'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
     ],
     ],
 
 
-    // 'sparkpost' => [
-    //     'secret' => env('SPARKPOST_SECRET'),
-    // ],
-
-    // 'stripe' => [
-    //     'model' => App\Models\User::class,
-    //     'key' => env('STRIPE_KEY'),
-    //     'secret' => env('STRIPE_SECRET'),
-    //     'webhook' => [
-    //         'secret' => env('STRIPE_WEBHOOK_SECRET'),
-    //         'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
-    //     ],
-    // ],
-
 ];
 ];

+ 9 - 7
config/session.php

@@ -72,7 +72,7 @@ return [
     |
     |
     */
     */
 
 
-    'connection' => env('SESSION_CONNECTION', null),
+    'connection' => env('SESSION_CONNECTION'),
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
@@ -92,13 +92,15 @@ return [
     | Session Cache Store
     | Session Cache Store
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     |
     |
-    | When using the "apc", "memcached", or "dynamodb" session drivers you may
+    | While using one of the framework's cache driven session backends you may
     | list a cache store that should be used for these sessions. This value
     | list a cache store that should be used for these sessions. This value
     | must match with one of the application's configured cache "stores".
     | must match with one of the application's configured cache "stores".
     |
     |
+    | Affects: "apc", "dynamodb", "memcached", "redis"
+    |
     */
     */
 
 
-    'store' => env('SESSION_STORE', null),
+    'store' => env('SESSION_STORE'),
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
@@ -153,7 +155,7 @@ return [
     |
     |
     */
     */
 
 
-    'domain' => env('SESSION_DOMAIN', null),
+    'domain' => env('SESSION_DOMAIN'),
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
@@ -162,7 +164,7 @@ return [
     |
     |
     | By setting this option to true, session cookies will only be sent back
     | By setting this option to true, session cookies will only be sent back
     | to the server if the browser has a HTTPS connection. This will keep
     | to the server if the browser has a HTTPS connection. This will keep
-    | the cookie from being sent to you if it can not be done securely.
+    | the cookie from being sent to you when it can't be done securely.
     |
     |
     */
     */
 
 
@@ -188,12 +190,12 @@ return [
     |
     |
     | This option determines how your cookies behave when cross-site requests
     | This option determines how your cookies behave when cross-site requests
     | take place, and can be used to mitigate CSRF attacks. By default, we
     | take place, and can be used to mitigate CSRF attacks. By default, we
-    | do not enable this as other CSRF protection services are in place.
+    | will set this value to "lax" since this is a secure default value.
     |
     |
     | Supported: "lax", "strict", "none", null
     | Supported: "lax", "strict", "none", null
     |
     |
     */
     */
 
 
-    'same_site' => null,
+    'same_site' => 'lax',
 
 
 ];
 ];

+ 1 - 1
package.json

@@ -26,7 +26,7 @@
         "@fortawesome/free-brands-svg-icons": "^5.15.4",
         "@fortawesome/free-brands-svg-icons": "^5.15.4",
         "@fortawesome/free-solid-svg-icons": "^5.15.4",
         "@fortawesome/free-solid-svg-icons": "^5.15.4",
         "@fortawesome/vue-fontawesome": "^2.0.6",
         "@fortawesome/vue-fontawesome": "^2.0.6",
-        "axios": "^1.0.0",
+        "axios": "^1.1.0",
         "bulma": "^0.9.3",
         "bulma": "^0.9.3",
         "bulma-checkradio": "^2.1.2",
         "bulma-checkradio": "^2.1.2",
         "bulma-switch": "^2.0.0",
         "bulma-switch": "^2.0.0",

+ 2 - 2
public/.htaccess

@@ -14,8 +14,8 @@
     RewriteCond %{REQUEST_URI} (.+)/$
     RewriteCond %{REQUEST_URI} (.+)/$
     RewriteRule ^ %1 [L,R=301]
     RewriteRule ^ %1 [L,R=301]
 
 
-    # Handle Front Controller...
+    # Send Requests To Front Controller...
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^ index.php [L]
     RewriteRule ^ index.php [L]
-</IfModule>
+</IfModule>

+ 9 - 30
public/index.php

@@ -3,13 +3,6 @@
 use Illuminate\Contracts\Http\Kernel;
 use Illuminate\Contracts\Http\Kernel;
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 
 
-/**
- * Laravel - A PHP Framework For Web Artisans
- *
- * @package  Laravel
- * @author   Taylor Otwell <taylor@laravel.com>
- */
-
 define('LARAVEL_START', microtime(true));
 define('LARAVEL_START', microtime(true));
 
 
 /*
 /*
@@ -23,8 +16,8 @@ define('LARAVEL_START', microtime(true));
 |
 |
 */
 */
 
 
-if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
-    require __DIR__.'/../storage/framework/maintenance.php';
+if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
+    require $maintenance;
 }
 }
 
 
 /*
 /*
@@ -33,9 +26,8 @@ if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 |
 |
 | Composer provides a convenient, automatically generated class loader for
 | Composer provides a convenient, automatically generated class loader for
-| our application. We just need to utilize it! We'll simply require it
-| into the script here so that we don't have to worry about manual
-| loading any of our classes later on. It feels great to relax.
+| this application. We just need to utilize it! We'll simply require it
+| into the script here so we don't need to manually load our classes.
 |
 |
 */
 */
 
 
@@ -43,34 +35,21 @@ require __DIR__.'/../vendor/autoload.php';
 
 
 /*
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
-| Turn On The Lights
+| Run The Application
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 |
 |
-| We need to illuminate PHP development, so let us turn on the lights.
-| This bootstraps the framework and gets it ready for use, then it
-| will load up this application so that we can run it and send
-| the responses back to the browser and delight our users.
+| Once we have the application, we can handle the incoming request using
+| the application's HTTP kernel. Then, we will send the response back
+| to this client's browser, allowing them to enjoy our application.
 |
 |
 */
 */
 
 
 $app = require_once __DIR__.'/../bootstrap/app.php';
 $app = require_once __DIR__.'/../bootstrap/app.php';
 
 
-/*
-|--------------------------------------------------------------------------
-| Run The Application
-|--------------------------------------------------------------------------
-|
-| Once we have the application, we can handle the incoming request
-| through the kernel, and send the associated response back to
-| the client's browser allowing them to enjoy the creative
-| and wonderful application we have prepared for them.
-|
-*/
-
 $kernel = $app->make(Kernel::class);
 $kernel = $app->make(Kernel::class);
 
 
 $response = $kernel->handle(
 $response = $kernel->handle(
     $request = Request::capture()
     $request = Request::capture()
 )->send();
 )->send();
 
 
-$kernel->terminate($request, $response);
+$kernel->terminate($request, $response);

+ 40 - 26
resources/lang/en/validation.php

@@ -18,17 +18,17 @@ return [
     'active_url' => 'The :attribute is not a valid URL.',
     'active_url' => 'The :attribute is not a valid URL.',
     'after' => 'The :attribute must be a date after :date.',
     'after' => 'The :attribute must be a date after :date.',
     'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
     'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
-    'alpha' => 'The :attribute may only contain letters.',
-    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
-    'alpha_num' => 'The :attribute may only contain letters and numbers.',
+    'alpha' => 'The :attribute must only contain letters.',
+    'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
+    'alpha_num' => 'The :attribute must only contain letters and numbers.',
     'array' => 'The :attribute must be an array.',
     'array' => 'The :attribute must be an array.',
     'before' => 'The :attribute must be a date before :date.',
     'before' => 'The :attribute must be a date before :date.',
     'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
     'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
     'between' => [
     'between' => [
-        'numeric' => 'The :attribute must be between :min and :max.',
+        'array' => 'The :attribute must have between :min and :max items.',
         'file' => 'The :attribute must be between :min and :max kilobytes.',
         'file' => 'The :attribute must be between :min and :max kilobytes.',
+        'numeric' => 'The :attribute must be between :min and :max.',
         'string' => 'The :attribute must be between :min and :max characters.',
         '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.',
     'boolean' => 'The :attribute field must be true or false.',
     'confirmed' => 'The :attribute confirmation does not match.',
     'confirmed' => 'The :attribute confirmation does not match.',
@@ -43,22 +43,25 @@ return [
     'digits_between' => 'The :attribute must be between :min and :max digits.',
     'digits_between' => 'The :attribute must be between :min and :max digits.',
     'dimensions' => 'The :attribute has invalid image dimensions.',
     'dimensions' => 'The :attribute has invalid image dimensions.',
     'distinct' => 'The :attribute field has a duplicate value.',
     'distinct' => 'The :attribute field has a duplicate value.',
+    'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
+    'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
     'email' => 'The :attribute must be a valid email address.',
     'email' => 'The :attribute must be a valid email address.',
     'ends_with' => 'The :attribute must end with one of the following: :values.',
     'ends_with' => 'The :attribute must end with one of the following: :values.',
+    'enum' => 'The selected :attribute is invalid.',
     'exists' => 'The selected :attribute is invalid.',
     'exists' => 'The selected :attribute is invalid.',
     'file' => 'The :attribute must be a file.',
     'file' => 'The :attribute must be a file.',
     'filled' => 'The :attribute field must have a value.',
     'filled' => 'The :attribute field must have a value.',
     'gt' => [
     'gt' => [
-        'numeric' => 'The :attribute must be greater than :value.',
+        'array' => 'The :attribute must have more than :value items.',
         'file' => 'The :attribute must be greater than :value kilobytes.',
         'file' => 'The :attribute must be greater than :value kilobytes.',
+        'numeric' => 'The :attribute must be greater than :value.',
         'string' => 'The :attribute must be greater than :value characters.',
         'string' => 'The :attribute must be greater than :value characters.',
-        'array' => 'The :attribute must have more than :value items.',
     ],
     ],
     'gte' => [
     'gte' => [
-        'numeric' => 'The :attribute must be greater than or equal :value.',
-        'file' => 'The :attribute must be greater than or equal :value kilobytes.',
-        'string' => 'The :attribute must be greater than or equal :value characters.',
         'array' => 'The :attribute must have :value items or more.',
         'array' => 'The :attribute must have :value items or more.',
+        'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
+        'numeric' => 'The :attribute must be greater than or equal to :value.',
+        'string' => 'The :attribute must be greater than or equal to :value characters.',
     ],
     ],
     'image' => 'The :attribute must be an image.',
     'image' => 'The :attribute must be an image.',
     'in' => 'The selected :attribute is invalid.',
     'in' => 'The selected :attribute is invalid.',
@@ -69,36 +72,45 @@ return [
     'ipv6' => 'The :attribute must be a valid IPv6 address.',
     'ipv6' => 'The :attribute must be a valid IPv6 address.',
     'json' => 'The :attribute must be a valid JSON string.',
     'json' => 'The :attribute must be a valid JSON string.',
     'lt' => [
     'lt' => [
-        'numeric' => 'The :attribute must be less than :value.',
+        'array' => 'The :attribute must have less than :value items.',
         'file' => 'The :attribute must be less than :value kilobytes.',
         'file' => 'The :attribute must be less than :value kilobytes.',
+        'numeric' => 'The :attribute must be less than :value.',
         'string' => 'The :attribute must be less than :value characters.',
         'string' => 'The :attribute must be less than :value characters.',
-        'array' => 'The :attribute must have less than :value items.',
     ],
     ],
     'lte' => [
     'lte' => [
-        'numeric' => 'The :attribute must be less than or equal :value.',
-        'file' => 'The :attribute must be less than or equal :value kilobytes.',
-        'string' => 'The :attribute must be less than or equal :value characters.',
         'array' => 'The :attribute must not have more than :value items.',
         'array' => 'The :attribute must not have more than :value items.',
+        'file' => 'The :attribute must be less than or equal to :value kilobytes.',
+        'numeric' => 'The :attribute must be less than or equal to :value.',
+        'string' => 'The :attribute must be less than or equal to :value characters.',
     ],
     ],
+    'mac_address' => 'The :attribute must be a valid MAC address.',
     'max' => [
     '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.',
+        'array' => 'The :attribute must not have more than :max items.',
+        'file' => 'The :attribute must not be greater than :max kilobytes.',
+        'numeric' => 'The :attribute must not be greater than :max.',
+        'string' => 'The :attribute must not be greater than :max characters.',
     ],
     ],
+    'max_digits' => 'The :attribute must not have more than :max digits.',
     'mimes' => 'The :attribute must be a file of type: :values.',
     'mimes' => 'The :attribute must be a file of type: :values.',
     'mimetypes' => 'The :attribute must be a file of type: :values.',
     'mimetypes' => 'The :attribute must be a file of type: :values.',
     'min' => [
     'min' => [
-        'numeric' => 'The :attribute must be at least :min.',
+        'array' => 'The :attribute must have at least :min items.',
         'file' => 'The :attribute must be at least :min kilobytes.',
         'file' => 'The :attribute must be at least :min kilobytes.',
+        'numeric' => 'The :attribute must be at least :min.',
         'string' => 'The :attribute must be at least :min characters.',
         'string' => 'The :attribute must be at least :min characters.',
-        'array' => 'The :attribute must have at least :min items.',
     ],
     ],
+    'min_digits' => 'The :attribute must have at least :min digits.',
     'multiple_of' => 'The :attribute must be a multiple of :value.',
     'multiple_of' => 'The :attribute must be a multiple of :value.',
     'not_in' => 'The selected :attribute is invalid.',
     'not_in' => 'The selected :attribute is invalid.',
     'not_regex' => 'The :attribute format is invalid.',
     'not_regex' => 'The :attribute format is invalid.',
     'numeric' => 'The :attribute must be a number.',
     'numeric' => 'The :attribute must be a number.',
-    'password' => 'The password is incorrect.',
+    'password' => [
+        'letters' => 'The :attribute must contain at least one letter.',
+        'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
+        'numbers' => 'The :attribute must contain at least one number.',
+        'symbols' => 'The :attribute must contain at least one symbol.',
+        'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
+    ],
     'present' => 'The :attribute field must be present.',
     'present' => 'The :attribute field must be present.',
     'prohibited' => 'The :attribute field is prohibited.',
     'prohibited' => 'The :attribute field is prohibited.',
     'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
     'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
@@ -106,7 +118,9 @@ return [
     'prohibits' => 'The :attribute field prohibits :other from being present.',
     'prohibits' => 'The :attribute field prohibits :other from being present.',
     'regex' => 'The :attribute format is invalid.',
     'regex' => 'The :attribute format is invalid.',
     'required' => 'The :attribute field is required.',
     'required' => 'The :attribute field is required.',
+    'required_array_keys' => 'The :attribute field must contain entries for: :values.',
     'required_if' => 'The :attribute field is required when :other is :value.',
     'required_if' => 'The :attribute field is required when :other is :value.',
+    'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
     'required_unless' => 'The :attribute field is required unless :other is in :values.',
     'required_unless' => 'The :attribute field is required unless :other is in :values.',
     'required_with' => 'The :attribute field is required when :values is present.',
     'required_with' => 'The :attribute field is required when :values is present.',
     'required_with_all' => 'The :attribute field is required when :values are present.',
     'required_with_all' => 'The :attribute field is required when :values are present.',
@@ -114,17 +128,17 @@ return [
     'required_without_all' => 'The :attribute field is required when none of :values are present.',
     'required_without_all' => 'The :attribute field is required when none of :values are present.',
     'same' => 'The :attribute and :other must match.',
     'same' => 'The :attribute and :other must match.',
     'size' => [
     'size' => [
-        'numeric' => 'The :attribute must be :size.',
+        'array' => 'The :attribute must contain :size items.',
         'file' => 'The :attribute must be :size kilobytes.',
         'file' => 'The :attribute must be :size kilobytes.',
+        'numeric' => 'The :attribute must be :size.',
         'string' => 'The :attribute must be :size characters.',
         'string' => 'The :attribute must be :size characters.',
-        'array' => 'The :attribute must contain :size items.',
     ],
     ],
     'starts_with' => 'The :attribute must start with one of the following: :values.',
     'starts_with' => 'The :attribute must start with one of the following: :values.',
     'string' => 'The :attribute must be a string.',
     'string' => 'The :attribute must be a string.',
-    'timezone' => 'The :attribute must be a valid zone.',
+    'timezone' => 'The :attribute must be a valid timezone.',
     'unique' => 'The :attribute has already been taken.',
     'unique' => 'The :attribute has already been taken.',
     'uploaded' => 'The :attribute failed to upload.',
     'uploaded' => 'The :attribute failed to upload.',
-    'url' => 'The :attribute must be a valid url.',
+    'url' => 'The :attribute must be a valid URL.',
     'uuid' => 'The :attribute must be a valid UUID.',
     'uuid' => 'The :attribute must be a valid UUID.',
 
 
     'single' => 'When using :attribute it must be the only parameter in this request body',
     'single' => 'When using :attribute it must be the only parameter in this request body',