Jelajahi Sumber

update laravel framework from 5.5 to 5.6

admin 7 tahun lalu
induk
melakukan
2e78210a57
48 mengubah file dengan 671 tambahan dan 540 penghapusan
  1. 16 0
      .editorconfig
  2. 6 0
      .env.example
  3. 4 1
      .gitignore
  4. 4 17
      app/Console/Kernel.php
  5. 14 26
      app/Exceptions/Handler.php
  6. 15 12
      app/Http/Kernel.php
  7. 17 0
      app/Http/Middleware/CheckForMaintenanceMode.php
  8. 2 2
      app/Http/Middleware/EncryptCookies.php
  9. 2 2
      app/Http/Middleware/TrimStrings.php
  10. 23 0
      app/Http/Middleware/TrustProxies.php
  11. 2 2
      app/Http/Middleware/VerifyCsrfToken.php
  12. 3 1
      artisan
  13. 24 9
      composer.json
  14. 165 25
      composer.lock
  15. 1 20
      config/app.php
  16. 2 1
      config/broadcasting.php
  17. 4 1
      config/cache.php
  18. 5 4
      config/filesystems.php
  19. 52 0
      config/hashing.php
  20. 81 0
      config/logging.php
  21. 2 2
      config/mail.php
  22. 0 4
      config/muv2.php
  23. 10 9
      config/queue.php
  24. 1 1
      config/services.php
  25. 20 2
      config/session.php
  26. 0 24
      database/factories/ModelFactory.php
  27. 23 0
      database/factories/UserFactory.php
  28. 35 0
      database/migrations/2014_10_12_000000_create_users_table.php
  29. 32 0
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  30. 0 77
      database/seeds/ConfigTableSeeder.php
  31. 0 73
      database/seeds/CountryTableSeeder.php
  32. 1 1
      database/seeds/DatabaseSeeder.php
  33. 0 22
      database/seeds/LevelTableSeeder.php
  34. 0 52
      database/seeds/SsConfigTableSeeder.php
  35. 0 53
      database/seeds/UserTableSeeder.php
  36. 20 19
      package.json
  37. 7 5
      phpunit.xml
  38. 7 6
      public/.htaccess
  39. 3 1
      public/index.php
  40. 1 1
      resources/assets/js/app.js
  41. 5 2
      resources/assets/js/bootstrap.js
  42. 0 23
      resources/assets/js/components/Example.vue
  43. 23 0
      resources/assets/js/components/ExampleComponent.vue
  44. 14 32
      resources/assets/sass/_variables.scss
  45. 8 3
      resources/assets/sass/app.scss
  46. 1 3
      tests/Feature/ExampleTest.php
  47. 1 2
      tests/Unit/ExampleTest.php
  48. 15 0
      webpack.mix.js

+ 16 - 0
.editorconfig

@@ -0,0 +1,16 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.yml]
+indent_style = space
+indent_size = 2

+ 6 - 0
.env.example

@@ -10,6 +10,7 @@ APP_LOCALE=zh-CN
 APP_FALLBACK_LOCALE=en
 APP_LOG=daily
 APP_LOG_LEVEL=debug
+LOG_CHANNEL=stack
 
 DB_CONNECTION=mysql
 DB_HOST=127.0.0.1
@@ -22,6 +23,7 @@ DB_STRICT=false
 BROADCAST_DRIVER=log
 CACHE_DRIVER=file
 SESSION_DRIVER=file
+SESSION_LIFETIME=120
 QUEUE_DRIVER=sync
 
 REDIS_HOST=127.0.0.1
@@ -40,5 +42,9 @@ MAIL_FROM_NAME=SSRPanel
 PUSHER_APP_ID=
 PUSHER_APP_KEY=
 PUSHER_APP_SECRET=
+PUSHER_APP_CLUSTER=mt1
+
+MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
+MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
 
 REDIRECT_HTTPS=false

+ 4 - 1
.gitignore

@@ -1,5 +1,7 @@
 /node_modules
 /public/upload
+/public/storage
+/public/hot
 /storage/framework/cache
 /storage/framework/sessions
 /storage/framework/views
@@ -16,4 +18,5 @@ npm-debug.log
 .DS_Store
 .phpstorm.meta.php
 yarn-error.log
-.env
+.env
+.phpunit.result.cache

+ 4 - 17
app/Console/Kernel.php

@@ -13,22 +13,7 @@ class Kernel extends ConsoleKernel
      * @var array
      */
     protected $commands = [
-        \App\Console\Commands\AutoJob::class,
-        \App\Console\Commands\AutoClearLog::class,
-        \App\Console\Commands\AutoDecGoodsTraffic::class,
-        \App\Console\Commands\AutoResetUserTraffic::class,
-        \App\Console\Commands\AutoCheckNodeStatus::class,
-        \App\Console\Commands\AutoStatisticsNodeDailyTraffic::class,
-        \App\Console\Commands\AutoStatisticsNodeHourlyTraffic::class,
-        \App\Console\Commands\AutoStatisticsUserDailyTraffic::class,
-        \App\Console\Commands\AutoStatisticsUserHourlyTraffic::class,
-        \App\Console\Commands\UserTrafficAbnormalAutoWarning::class,
-        \App\Console\Commands\UserExpireAutoWarning::class,
-        \App\Console\Commands\UserTrafficAutoWarning::class,
-        \App\Console\Commands\upgradeUserPassword::class,
-        \App\Console\Commands\upgradeUserVmessId::class,
-        \App\Console\Commands\upgradeUserSubscribe::class,
-        \App\Console\Commands\AutoReportNode::class,
+        //
     ];
 
     /**
@@ -56,12 +41,14 @@ class Kernel extends ConsoleKernel
     }
 
     /**
-     * Register the Closure based commands for the application.
+     * Register the commands for the application.
      *
      * @return void
      */
     protected function commands()
     {
+        $this->load(__DIR__.'/Commands');
+
         require base_path('routes/console.php');
     }
 }

+ 14 - 26
app/Exceptions/Handler.php

@@ -11,25 +11,30 @@ use ReflectionException;
 class Handler extends ExceptionHandler
 {
     /**
-     * A list of the exception types that should not be reported.
+     * A list of the exception types that are not reported.
      *
      * @var array
      */
     protected $dontReport = [
-        \Illuminate\Auth\AuthenticationException::class,
-        \Illuminate\Auth\Access\AuthorizationException::class,
-        \Symfony\Component\HttpKernel\Exception\HttpException::class,
-        \Illuminate\Database\Eloquent\ModelNotFoundException::class,
-        \Illuminate\Session\TokenMismatchException::class,
-        \Illuminate\Validation\ValidationException::class,
+        //
+    ];
+
+    /**
+     * A list of the inputs that are never flashed for validation exceptions.
+     *
+     * @var array
+     */
+    protected $dontFlash = [
+        'password',
+        'password_confirmation',
     ];
 
     /**
      * Report or log an exception.
-     * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
      *
-     * @param  Exception $exception
+     * @param Exception $exception
      *
+     * @return mixed|void
      * @throws Exception
      */
     public function report(Exception $exception)
@@ -83,21 +88,4 @@ class Handler extends ExceptionHandler
 
         return response()->view('error.404');
     }
-
-    /**
-     * Convert an authentication exception into an unauthenticated response.
-     *
-     * @param  \Illuminate\Http\Request                 $request
-     * @param  \Illuminate\Auth\AuthenticationException $exception
-     *
-     * @return \Illuminate\Http\Response
-     */
-    protected function unauthenticated($request, AuthenticationException $exception)
-    {
-        if ($request->expectsJson()) {
-            return response()->json(['error' => 'Unauthenticated.'], 401);
-        }
-
-        return redirect()->guest(route('login'));
-    }
 }

+ 15 - 12
app/Http/Kernel.php

@@ -14,10 +14,11 @@ class Kernel extends HttpKernel
      * @var array
      */
     protected $middleware = [
-        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
+        \App\Http\Middleware\CheckForMaintenanceMode::class,
         \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
         \App\Http\Middleware\TrimStrings::class,
         \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
+        \App\Http\Middleware\TrustProxies::class,
     ];
 
     /**
@@ -38,7 +39,7 @@ class Kernel extends HttpKernel
         ],
 
         'api' => [
-            'throttle:200,1', // API请求限制:1分钟内同一个IP限制只能请求200次
+            'throttle:60,1',
             'bindings',
         ],
     ];
@@ -51,16 +52,18 @@ class Kernel extends HttpKernel
      * @var array
      */
     protected $routeMiddleware = [
-        'auth'        => \Illuminate\Auth\Middleware\Authenticate::class,
-        'auth.basic'  => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
-        'bindings'    => \Illuminate\Routing\Middleware\SubstituteBindings::class,
-        'can'         => \Illuminate\Auth\Middleware\Authorize::class,
-        'guest'       => \App\Http\Middleware\RedirectIfAuthenticated::class,
-        'throttle'    => \Illuminate\Routing\Middleware\ThrottleRequests::class,
-        'isAdmin'     => \App\Http\Middleware\isAdmin::class,
-        'isLogin'     => \App\Http\Middleware\isLogin::class,
-        'isForbidden' => \App\Http\Middleware\isForbidden::class,
-        'affiliate'   => \App\Http\Middleware\Affiliate::class,
+        'auth'          => \Illuminate\Auth\Middleware\Authenticate::class,
+        'auth.basic'    => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+        'bindings'      => \Illuminate\Routing\Middleware\SubstituteBindings::class,
+        'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
+        'can'           => \Illuminate\Auth\Middleware\Authorize::class,
+        'guest'         => \App\Http\Middleware\RedirectIfAuthenticated::class,
+        'signed'        => \Illuminate\Routing\Middleware\ValidateSignature::class,
+        'throttle'      => \Illuminate\Routing\Middleware\ThrottleRequests::class,
+        'isAdmin'       => \App\Http\Middleware\isAdmin::class,
+        'isLogin'       => \App\Http\Middleware\isLogin::class,
+        'isForbidden'   => \App\Http\Middleware\isForbidden::class,
+        'affiliate'     => \App\Http\Middleware\Affiliate::class,
 
     ];
 }

+ 17 - 0
app/Http/Middleware/CheckForMaintenanceMode.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
+
+class CheckForMaintenanceMode extends Middleware
+{
+    /**
+     * The URIs that should be reachable while maintenance mode is enabled.
+     *
+     * @var array
+     */
+    protected $except = [
+        //
+    ];
+}

+ 2 - 2
app/Http/Middleware/EncryptCookies.php

@@ -2,9 +2,9 @@
 
 namespace App\Http\Middleware;
 
-use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
+use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
 
-class EncryptCookies extends BaseEncrypter
+class EncryptCookies extends Middleware
 {
     /**
      * The names of the cookies that should not be encrypted.

+ 2 - 2
app/Http/Middleware/TrimStrings.php

@@ -2,9 +2,9 @@
 
 namespace App\Http\Middleware;
 
-use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
+use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
 
-class TrimStrings extends BaseTrimmer
+class TrimStrings extends Middleware
 {
     /**
      * The names of the attributes that should not be trimmed.

+ 23 - 0
app/Http/Middleware/TrustProxies.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Http\Request;
+use Fideloper\Proxy\TrustProxies as Middleware;
+
+class TrustProxies extends Middleware
+{
+    /**
+     * The trusted proxies for this application.
+     *
+     * @var array
+     */
+    protected $proxies;
+
+    /**
+     * The headers that should be used to detect proxies.
+     *
+     * @var int
+     */
+    protected $headers = Request::HEADER_X_FORWARDED_ALL;
+}

+ 2 - 2
app/Http/Middleware/VerifyCsrfToken.php

@@ -2,9 +2,9 @@
 
 namespace App\Http\Middleware;
 
-use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
+use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
 
-class VerifyCsrfToken extends BaseVerifier
+class VerifyCsrfToken extends Middleware
 {
     /**
      * The URIs that should be excluded from CSRF verification.

+ 3 - 1
artisan

@@ -1,6 +1,8 @@
 #!/usr/bin/env php
 <?php
 
+define('LARAVEL_START', microtime(true));
+
 /*
 |--------------------------------------------------------------------------
 | Register The Auto Loader
@@ -13,7 +15,7 @@
 |
 */
 
-require __DIR__.'/bootstrap/autoload.php';
+require __DIR__.'/vendor/autoload.php';
 
 $app = require_once __DIR__.'/bootstrap/app.php';
 

+ 24 - 9
composer.json

@@ -5,15 +5,15 @@
     "license": "MIT",
     "type": "project",
     "require": {
-        "php": ">=7.1.3",
+        "php": "^7.1.3",
         "barryvdh/laravel-ide-helper": "^2.4",
-        "fideloper/proxy": "~4.0",
+        "fideloper/proxy": "^4.0",
         "guzzlehttp/guzzle": "^6.3",
         "ipip/db": "^0.6.0",
         "itbdw/ip-database": "^2.0",
         "jenssegers/agent": "^2.5",
         "laravel/framework": "5.6.*",
-        "laravel/tinker": "~1.0",
+        "laravel/tinker": "^1.0",
         "mews/captcha": "^2.1",
         "mews/purifier": "^2.0",
         "openlss/lib-array2xml": "^0.5.1",
@@ -26,16 +26,19 @@
         "youzan/open-sdk": "^1.0"
     },
     "require-dev": {
-        "fzaninotto/faker": "~1.4",
-        "mockery/mockery": "0.9.*",
-        "phpunit/phpunit": "~7.0"
+        "filp/whoops": "^2.0",
+        "fzaninotto/faker": "^1.4",
+        "mockery/mockery": "^1.0",
+        "nunomaduro/collision": "^2.0",
+        "phpunit/phpunit": "^7.0"
     },
     "autoload": {
         "files": [
             "app/helpers.php"
         ],
         "classmap": [
-            "database"
+            "database/seeds",
+            "database/factories"
         ],
         "psr-4": {
             "App\\": "app/"
@@ -46,12 +49,22 @@
             "Tests\\": "tests/"
         }
     },
+    "extra": {
+        "laravel": {
+            "dont-discover": [
+            ]
+        }
+    },
     "scripts": {
         "post-root-package-install": [
-            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
+            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
         ],
         "post-create-project-cmd": [
-            "php artisan key:generate"
+            "@php artisan key:generate"
+        ],
+        "post-autoload-dump": [
+            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
+            "@php artisan package:discover"
         ]
     },
     "config": {
@@ -59,6 +72,8 @@
         "sort-packages": true,
         "optimize-autoloader": true
     },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
     "repositories": {
         "packagist": {
             "type": "composer",

+ 165 - 25
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "619e466343f129a40d510b0322f39c76",
+    "content-hash": "2b4ad7aadcf9ad1a0a48524529896343",
     "packages": [
         {
             "name": "barryvdh/laravel-ide-helper",
@@ -4983,6 +4983,73 @@
             ],
             "time": "2017-07-22T11:58:36+00:00"
         },
+        {
+            "name": "filp/whoops",
+            "version": "2.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/filp/whoops.git",
+                "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/filp/whoops/zipball/bc0fd11bc455cc20ee4b5edabc63ebbf859324c7",
+                "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://dl.laravel-china.org/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": "^5.5.9 || ^7.0",
+                "psr/log": "^1.0.1"
+            },
+            "require-dev": {
+                "mockery/mockery": "^0.9 || ^1.0",
+                "phpunit/phpunit": "^4.8.35 || ^5.7",
+                "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0"
+            },
+            "suggest": {
+                "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
+                "whoops/soap": "Formats errors as SOAP responses"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Whoops\\": "src/Whoops/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Filipe Dobreira",
+                    "homepage": "https://github.com/filp",
+                    "role": "Developer"
+                }
+            ],
+            "description": "php error handling for cool kids",
+            "homepage": "https://filp.github.io/whoops/",
+            "keywords": [
+                "error",
+                "exception",
+                "handling",
+                "library",
+                "throwable",
+                "whoops"
+            ],
+            "time": "2018-10-23T09:00:00+00:00"
+        },
         {
             "name": "fzaninotto/faker",
             "version": "v1.8.0",
@@ -5041,16 +5108,16 @@
         },
         {
             "name": "hamcrest/hamcrest-php",
-            "version": "v1.2.2",
+            "version": "v2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/hamcrest/hamcrest-php.git",
-                "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c"
+                "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c",
-                "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c",
+                "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
+                "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5060,7 +5127,7 @@
                 ]
             },
             "require": {
-                "php": ">=5.3.2"
+                "php": "^5.3|^7.0"
             },
             "replace": {
                 "cordoval/hamcrest-php": "*",
@@ -5069,15 +5136,18 @@
             },
             "require-dev": {
                 "phpunit/php-file-iterator": "1.3.3",
-                "satooshi/php-coveralls": "dev-master"
+                "phpunit/phpunit": "~4.0",
+                "satooshi/php-coveralls": "^1.0"
             },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
             "autoload": {
                 "classmap": [
                     "hamcrest"
-                ],
-                "files": [
-                    "hamcrest/Hamcrest.php"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -5088,20 +5158,20 @@
             "keywords": [
                 "test"
             ],
-            "time": "2015-05-11T14:41:42+00:00"
+            "time": "2016-01-20T08:20:44+00:00"
         },
         {
             "name": "mockery/mockery",
-            "version": "0.9.10",
+            "version": "1.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mockery/mockery.git",
-                "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5"
+                "reference": "100633629bf76d57430b86b7098cd6beb996a35a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mockery/mockery/zipball/4876fc0c7d9e5da49712554a35c94d84ed1e9ee5",
-                "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5",
+                "url": "https://api.github.com/repos/mockery/mockery/zipball/100633629bf76d57430b86b7098cd6beb996a35a",
+                "reference": "100633629bf76d57430b86b7098cd6beb996a35a",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5111,17 +5181,17 @@
                 ]
             },
             "require": {
-                "hamcrest/hamcrest-php": "~1.1",
+                "hamcrest/hamcrest-php": "~2.0",
                 "lib-pcre": ">=7.0",
-                "php": ">=5.3.2"
+                "php": ">=5.6.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.0"
+                "phpunit/phpunit": "~5.7.10|~6.5|~7.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "0.9.x-dev"
+                    "dev-master": "1.0.x-dev"
                 }
             },
             "autoload": {
@@ -5145,8 +5215,8 @@
                     "homepage": "http://davedevelopment.co.uk"
                 }
             ],
-            "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.",
-            "homepage": "http://github.com/padraic/mockery",
+            "description": "Mockery is a simple yet flexible PHP mock object framework",
+            "homepage": "https://github.com/mockery/mockery",
             "keywords": [
                 "BDD",
                 "TDD",
@@ -5159,7 +5229,7 @@
                 "test double",
                 "testing"
             ],
-            "time": "2018-11-13T20:50:16+00:00"
+            "time": "2018-10-02T21:52:37+00:00"
         },
         {
             "name": "myclabs/deep-copy",
@@ -5215,6 +5285,76 @@
             ],
             "time": "2018-06-11T23:09:50+00:00"
         },
+        {
+            "name": "nunomaduro/collision",
+            "version": "v2.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nunomaduro/collision.git",
+                "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5feb0c0d92978ec7169232ce5d70d6da6b29f63",
+                "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://dl.laravel-china.org/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "filp/whoops": "^2.1.4",
+                "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*",
+                "php": "^7.1",
+                "symfony/console": "~2.8|~3.3|~4.0"
+            },
+            "require-dev": {
+                "laravel/framework": "5.7.*",
+                "nunomaduro/larastan": "^0.3.0",
+                "phpstan/phpstan": "^0.10",
+                "phpunit/phpunit": "~7.3"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "NunoMaduro\\Collision\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nuno Maduro",
+                    "email": "[email protected]"
+                }
+            ],
+            "description": "Cli error handling for console/command-line PHP applications.",
+            "keywords": [
+                "artisan",
+                "cli",
+                "command-line",
+                "console",
+                "error",
+                "handling",
+                "laravel",
+                "laravel-zero",
+                "php",
+                "symfony"
+            ],
+            "time": "2018-11-21T21:40:54+00:00"
+        },
         {
             "name": "phar-io/manifest",
             "version": "1.0.3",
@@ -6674,12 +6814,12 @@
         }
     ],
     "aliases": [],
-    "minimum-stability": "stable",
+    "minimum-stability": "dev",
     "stability-flags": [],
-    "prefer-stable": false,
+    "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {
-        "php": ">=7.1.3"
+        "php": "^7.1.3"
     },
     "platform-dev": []
 }

+ 1 - 20
config/app.php

@@ -10,6 +10,7 @@ return [
     | This value is the name of your application. This value is used when the
     | framework needs to place the application's name in a notification or
     | any other location as required by the application or its packages.
+    |
     */
 
     'name' => env('APP_NAME', 'Laravel'),
@@ -107,25 +108,6 @@ return [
 
     'cipher' => 'AES-256-CBC',
 
-    /*
-    |--------------------------------------------------------------------------
-    | Logging Configuration
-    |--------------------------------------------------------------------------
-    |
-    | Here you may configure the log settings for your application. Out of
-    | the box, Laravel uses the Monolog PHP logging library. This gives
-    | you a variety of powerful log handlers / formatters to utilize.
-    |
-    | Available Settings: "single", "daily", "syslog", "errorlog"
-    |
-    */
-
-    'log' => env('APP_LOG', 'single'),
-
-    'log_level' => env('APP_LOG_LEVEL', 'debug'),
-
-    'log_max_files' => 30,
-
     /*
     |--------------------------------------------------------------------------
     | Autoloaded Service Providers
@@ -168,7 +150,6 @@ return [
         /*
          * Package Service Providers...
          */
-        Laravel\Tinker\TinkerServiceProvider::class,
 
         /*
          * Application Service Providers...

+ 2 - 1
config/broadcasting.php

@@ -36,7 +36,8 @@ return [
             'secret' => env('PUSHER_APP_SECRET'),
             'app_id' => env('PUSHER_APP_ID'),
             'options' => [
-                //
+                'cluster' => env('PUSHER_APP_CLUSTER'),
+                'encrypted' => true,
             ],
         ],
 

+ 4 - 1
config/cache.php

@@ -86,6 +86,9 @@ return [
     |
     */
 
-    'prefix' => 'ssrpanel',
+    'prefix' => env(
+        'CACHE_PREFIX',
+        str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
+    ),
 
 ];

+ 5 - 4
config/filesystems.php

@@ -37,7 +37,7 @@ return [
     | may even configure multiple disks of the same driver. Defaults have
     | been setup for each driver as an example of the required options.
     |
-    | Supported Drivers: "local", "ftp", "s3", "rackspace"
+    | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
     |
     */
 
@@ -57,10 +57,11 @@ return [
 
         's3' => [
             'driver' => 's3',
-            'key' => env('AWS_KEY'),
-            'secret' => env('AWS_SECRET'),
-            'region' => env('AWS_REGION'),
+            'key' => env('AWS_ACCESS_KEY_ID'),
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
+            'region' => env('AWS_DEFAULT_REGION'),
             'bucket' => env('AWS_BUCKET'),
+            'url' => env('AWS_URL'),
         ],
 
     ],

+ 52 - 0
config/hashing.php

@@ -0,0 +1,52 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Hash Driver
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default hash driver that will be used to hash
+    | passwords for your application. By default, the bcrypt algorithm is
+    | used; however, you remain free to modify this option if you wish.
+    |
+    | Supported: "bcrypt", "argon"
+    |
+    */
+
+    'driver' => 'bcrypt',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Bcrypt Options
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the configuration options that should be used when
+    | passwords are hashed using the Bcrypt algorithm. This will allow you
+    | to control the amount of time it takes to hash the given password.
+    |
+    */
+
+    'bcrypt' => [
+        'rounds' => env('BCRYPT_ROUNDS', 10),
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Argon Options
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the configuration options that should be used when
+    | passwords are hashed using the Argon algorithm. These will allow you
+    | to control the amount of time it takes to hash the given password.
+    |
+    */
+
+    'argon' => [
+        'memory' => 1024,
+        'threads' => 2,
+        'time' => 2,
+    ],
+
+];

+ 81 - 0
config/logging.php

@@ -0,0 +1,81 @@
+<?php
+
+use Monolog\Handler\StreamHandler;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Log Channel
+    |--------------------------------------------------------------------------
+    |
+    | This option defines the default log channel that gets used when writing
+    | messages to the logs. The name specified in this option should match
+    | one of the channels defined in the "channels" configuration array.
+    |
+    */
+
+    'default' => env('LOG_CHANNEL', 'stack'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Log Channels
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure the log channels for your application. Out of
+    | the box, Laravel uses the Monolog PHP logging library. This gives
+    | you a variety of powerful log handlers / formatters to utilize.
+    |
+    | Available Drivers: "single", "daily", "slack", "syslog",
+    |                    "errorlog", "monolog",
+    |                    "custom", "stack"
+    |
+    */
+
+    'channels' => [
+        'stack' => [
+            'driver' => 'stack',
+            'channels' => ['single'],
+        ],
+
+        'single' => [
+            'driver' => 'single',
+            'path' => storage_path('logs/laravel.log'),
+            'level' => 'debug',
+        ],
+
+        'daily' => [
+            'driver' => 'daily',
+            'path' => storage_path('logs/laravel.log'),
+            'level' => 'debug',
+            'days' => 7,
+        ],
+
+        'slack' => [
+            'driver' => 'slack',
+            'url' => env('LOG_SLACK_WEBHOOK_URL'),
+            'username' => 'Laravel Log',
+            'emoji' => ':boom:',
+            'level' => 'critical',
+        ],
+
+        'stderr' => [
+            'driver' => 'monolog',
+            'handler' => StreamHandler::class,
+            'with' => [
+                'stream' => 'php://stderr',
+            ],
+        ],
+
+        'syslog' => [
+            'driver' => 'syslog',
+            'level' => 'debug',
+        ],
+
+        'errorlog' => [
+            'driver' => 'errorlog',
+            'level' => 'debug',
+        ],
+    ],
+
+];

+ 2 - 2
config/mail.php

@@ -56,8 +56,8 @@ return [
     */
 
     'from' => [
-        'address' => env('MAIL_FROM_ADDRESS'),
-        'name'    => env('MAIL_FROM_NAME'),
+        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
+        'name' => env('MAIL_FROM_NAME', 'Example'),
     ],
 
     /*

+ 0 - 4
config/muv2.php

@@ -1,4 +0,0 @@
-<?php
-
-// V2Ray配置
-return [];

+ 10 - 9
config/queue.php

@@ -4,14 +4,12 @@ return [
 
     /*
     |--------------------------------------------------------------------------
-    | Default Queue Driver
+    | Default Queue Connection Name
     |--------------------------------------------------------------------------
     |
     | Laravel's queue API supports an assortment of back-ends via a single
     | API, giving you convenient access to each back-end using the same
-    | syntax for each one. Here you may set the default queue driver.
-    |
-    | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+    | syntax for every one. Here you may define a default connection.
     |
     */
 
@@ -26,6 +24,8 @@ return [
     | is used by your application. A default configuration has been added
     | for each back-end shipped with Laravel. You are free to add more.
     |
+    | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+    |
     */
 
     'connections' => [
@@ -50,11 +50,11 @@ return [
 
         'sqs' => [
             'driver' => 'sqs',
-            'key' => 'your-public-key',
-            'secret' => 'your-secret-key',
-            'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
-            'queue' => 'your-queue-name',
-            'region' => 'us-east-1',
+            'key' => env('SQS_KEY', 'your-public-key'),
+            'secret' => env('SQS_SECRET', 'your-secret-key'),
+            'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
+            'queue' => env('SQS_QUEUE', 'your-queue-name'),
+            'region' => env('SQS_REGION', 'us-east-1'),
         ],
 
         'redis' => [
@@ -62,6 +62,7 @@ return [
             'connection' => 'default',
             'queue' => 'default',
             'retry_after' => 90,
+            'block_for' => null,
         ],
 
     ],

+ 1 - 1
config/services.php

@@ -22,7 +22,7 @@ return [
     'ses' => [
         'key' => env('SES_KEY'),
         'secret' => env('SES_SECRET'),
-        'region' => 'us-east-1',
+        'region' => env('SES_REGION', 'us-east-1'),
     ],
 
     'sparkpost' => [

+ 20 - 2
config/session.php

@@ -29,7 +29,7 @@ return [
     |
     */
 
-    'lifetime' => 180,
+    'lifetime' => env('SESSION_LIFETIME', 120),
 
     'expire_on_close' => false,
 
@@ -122,7 +122,10 @@ return [
     |
     */
 
-    'cookie' => 'ssrpanel_session',
+    'cookie' => env(
+        'SESSION_COOKIE',
+        str_slug(env('APP_NAME', 'laravel'), '_').'_session'
+    ),
 
     /*
     |--------------------------------------------------------------------------
@@ -176,4 +179,19 @@ return [
 
     'http_only' => true,
 
+    /*
+    |--------------------------------------------------------------------------
+    | Same-Site Cookies
+    |--------------------------------------------------------------------------
+    |
+    | This option determines how your cookies behave when cross-site requests
+    | 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.
+    |
+    | Supported: "lax", "strict"
+    |
+    */
+
+    'same_site' => null,
+
 ];

+ 0 - 24
database/factories/ModelFactory.php

@@ -1,24 +0,0 @@
-<?php
-
-/*
-|--------------------------------------------------------------------------
-| Model Factories
-|--------------------------------------------------------------------------
-|
-| Here you may define all of your model factories. Model factories give
-| you a convenient way to create models for testing and seeding your
-| database. Just tell the factory how a default model should look.
-|
-*/
-
-/** @var \Illuminate\Database\Eloquent\Factory $factory */
-$factory->define(App\Http\Models\User::class, function (Faker\Generator $faker) {
-    static $password;
-
-    return [
-        'name' => $faker->name,
-        'email' => $faker->unique()->safeEmail,
-        'password' => $password ?: $password = bcrypt('secret'),
-        'remember_token' => str_random(10),
-    ];
-});

+ 23 - 0
database/factories/UserFactory.php

@@ -0,0 +1,23 @@
+<?php
+
+use Faker\Generator as Faker;
+
+/*
+|--------------------------------------------------------------------------
+| Model Factories
+|--------------------------------------------------------------------------
+|
+| This directory should contain each of the model factory definitions for
+| your application. Factories provide a convenient way to generate new
+| model instances for testing / seeding your application's database.
+|
+*/
+
+$factory->define(App\User::class, function (Faker $faker) {
+    return [
+        'name' => $faker->name,
+        'email' => $faker->unique()->safeEmail,
+        'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
+        'remember_token' => str_random(10),
+    ];
+});

+ 35 - 0
database/migrations/2014_10_12_000000_create_users_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateUsersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('users', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('name');
+            $table->string('email')->unique();
+            $table->string('password');
+            $table->rememberToken();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('users');
+    }
+}

+ 32 - 0
database/migrations/2014_10_12_100000_create_password_resets_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePasswordResetsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('password_resets', function (Blueprint $table) {
+            $table->string('email')->index();
+            $table->string('token');
+            $table->timestamp('created_at')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('password_resets');
+    }
+}

+ 0 - 77
database/seeds/ConfigTableSeeder.php

@@ -1,77 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class ConfigTableSeeder extends Seeder
-{
-    /**
-     * Run the database seeds.
-     *
-     * @return void
-     */
-    public function run()
-    {
-        DB::insert("INSERT INTO `config` VALUES ('1', 'is_rand_port', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('2', 'is_user_rand_port', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('3', 'invite_num', 3);");
-        DB::insert("INSERT INTO `config` VALUES ('4', 'is_register', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('5', 'is_invite_register', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('6', 'website_name', 'SSRPanel');");
-        DB::insert("INSERT INTO `config` VALUES ('7', 'is_reset_password', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('8', 'reset_password_times', 3);");
-        DB::insert("INSERT INTO `config` VALUES ('9', 'website_url', 'http://www.ssrpanel.com');");
-        DB::insert("INSERT INTO `config` VALUES ('10', 'is_active_register', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('11', 'active_times', 3);");
-        DB::insert("INSERT INTO `config` VALUES ('12', 'login_add_score', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('13', 'min_rand_score', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('14', 'max_rand_score', 100);");
-        DB::insert("INSERT INTO `config` VALUES ('15', 'wechat_qrcode', '');");
-        DB::insert("INSERT INTO `config` VALUES ('16', 'alipay_qrcode', '');");
-        DB::insert("INSERT INTO `config` VALUES ('17', 'login_add_score_range', 1440);");
-        DB::insert("INSERT INTO `config` VALUES ('18', 'referral_traffic', 1024);");
-        DB::insert("INSERT INTO `config` VALUES ('19', 'referral_percent', 0.2);");
-        DB::insert("INSERT INTO `config` VALUES ('20', 'referral_money', 100);");
-        DB::insert("INSERT INTO `config` VALUES ('21', 'referral_status', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('22', 'default_traffic', 1024);");
-        DB::insert("INSERT INTO `config` VALUES ('23', 'traffic_warning', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('24', 'traffic_warning_percent', 80);");
-        DB::insert("INSERT INTO `config` VALUES ('25', 'expire_warning', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('26', 'expire_days', 15);");
-        DB::insert("INSERT INTO `config` VALUES ('27', 'reset_traffic', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('28', 'default_days', 7);");
-        DB::insert("INSERT INTO `config` VALUES ('29', 'subscribe_max', 3);");
-        DB::insert("INSERT INTO `config` VALUES ('30', 'min_port', 10000);");
-        DB::insert("INSERT INTO `config` VALUES ('31', 'max_port', 40000);");
-        DB::insert("INSERT INTO `config` VALUES ('32', 'is_captcha', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('33', 'is_traffic_ban', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('34', 'traffic_ban_value', 10);");
-        DB::insert("INSERT INTO `config` VALUES ('35', 'traffic_ban_time', 60);");
-        DB::insert("INSERT INTO `config` VALUES ('36', 'is_clear_log', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('37', 'is_node_crash_warning', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('38', 'crash_warning_email', '');");
-        DB::insert("INSERT INTO `config` VALUES ('39', 'is_server_chan', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('40', 'server_chan_key', '');");
-        DB::insert("INSERT INTO `config` VALUES ('41', 'is_subscribe_ban', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('42', 'subscribe_ban_times', 20);");
-        DB::insert("INSERT INTO `config` VALUES ('43', 'paypal_status', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('44', 'paypal_client_id', '');");
-        DB::insert("INSERT INTO `config` VALUES ('45', 'paypal_client_secret', '');");
-        DB::insert("INSERT INTO `config` VALUES ('46', 'is_free_code', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('47', 'is_forbid_robot', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('48', 'subscribe_domain', '');");
-        DB::insert("INSERT INTO `config` VALUES ('49', 'auto_release_port', 1);");
-        DB::insert("INSERT INTO `config` VALUES ('50', 'is_youzan', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('51', 'youzan_client_id', '');");
-        DB::insert("INSERT INTO `config` VALUES ('52', 'youzan_client_secret', '');");
-        DB::insert("INSERT INTO `config` VALUES ('53', 'kdt_id', '');");
-        DB::insert("INSERT INTO `config` VALUES ('54', 'initial_labels_for_user', '');");
-        DB::insert("INSERT INTO `config` VALUES ('55', 'website_analytics', '');");
-        DB::insert("INSERT INTO `config` VALUES ('56', 'website_customer_service', '');");
-        DB::insert("INSERT INTO `config` VALUES ('57', 'register_ip_limit', 5);");
-        DB::insert("INSERT INTO `config` VALUES ('58', 'goods_purchase_limit_strategy', 'none');");
-        DB::insert("INSERT INTO `config` VALUES ('59', 'is_push_bear', 0);");
-        DB::insert("INSERT INTO `config` VALUES ('60', 'push_bear_send_key', '');");
-        DB::insert("INSERT INTO `config` VALUES ('61', 'push_bear_qrcode', '');");
-        DB::insert("INSERT INTO `config` VALUES ('62', 'is_ban_status', 0);");
-    }
-}

+ 0 - 73
database/seeds/CountryTableSeeder.php

@@ -1,73 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class CountryTableSeeder extends Seeder
-{
-    /**
-     * Run the database seeds.
-     *
-     * @return void
-     */
-    public function run()
-    {
-        DB::insert("INSERT INTO `country` VALUES ('1', '澳大利亚', 'au');");
-        DB::insert("INSERT INTO `country` VALUES ('2', '巴西', 'br');");
-        DB::insert("INSERT INTO `country` VALUES ('3', '加拿大', 'ca');");
-        DB::insert("INSERT INTO `country` VALUES ('4', '瑞士', 'ch');");
-        DB::insert("INSERT INTO `country` VALUES ('5', '中国', 'cn');");
-        DB::insert("INSERT INTO `country` VALUES ('6', '德国', 'de');");
-        DB::insert("INSERT INTO `country` VALUES ('7', '丹麦', 'dk');");
-        DB::insert("INSERT INTO `country` VALUES ('8', '埃及', 'eg');");
-        DB::insert("INSERT INTO `country` VALUES ('9', '法国', 'fr');");
-        DB::insert("INSERT INTO `country` VALUES ('10', '希腊', 'gr');");
-        DB::insert("INSERT INTO `country` VALUES ('11', '香港', 'hk');");
-        DB::insert("INSERT INTO `country` VALUES ('12', '印度尼西亚', 'id');");
-        DB::insert("INSERT INTO `country` VALUES ('13', '爱尔兰', 'ie');");
-        DB::insert("INSERT INTO `country` VALUES ('14', '以色列', 'il');");
-        DB::insert("INSERT INTO `country` VALUES ('15', '印度', 'in');");
-        DB::insert("INSERT INTO `country` VALUES ('16', '伊拉克', 'iq');");
-        DB::insert("INSERT INTO `country` VALUES ('17', '伊朗', 'ir');");
-        DB::insert("INSERT INTO `country` VALUES ('18', '意大利', 'it');");
-        DB::insert("INSERT INTO `country` VALUES ('19', '日本', 'jp');");
-        DB::insert("INSERT INTO `country` VALUES ('20', '韩国', 'kr');");
-        DB::insert("INSERT INTO `country` VALUES ('21', '墨西哥', 'mx');");
-        DB::insert("INSERT INTO `country` VALUES ('22', '马来西亚', 'my');");
-        DB::insert("INSERT INTO `country` VALUES ('23', '荷兰', 'nl');");
-        DB::insert("INSERT INTO `country` VALUES ('24', '挪威', 'no');");
-        DB::insert("INSERT INTO `country` VALUES ('25', '纽西兰', 'nz');");
-        DB::insert("INSERT INTO `country` VALUES ('26', '菲律宾', 'ph');");
-        DB::insert("INSERT INTO `country` VALUES ('27', '俄罗斯', 'ru');");
-        DB::insert("INSERT INTO `country` VALUES ('28', '瑞典', 'se');");
-        DB::insert("INSERT INTO `country` VALUES ('29', '新加坡', 'sg');");
-        DB::insert("INSERT INTO `country` VALUES ('30', '泰国', 'th');");
-        DB::insert("INSERT INTO `country` VALUES ('31', '土耳其', 'tr');");
-        DB::insert("INSERT INTO `country` VALUES ('32', '台湾', 'tw');");
-        DB::insert("INSERT INTO `country` VALUES ('33', '英国', 'uk');");
-        DB::insert("INSERT INTO `country` VALUES ('34', '美国', 'us');");
-        DB::insert("INSERT INTO `country` VALUES ('35', '越南', 'vn');");
-        DB::insert("INSERT INTO `country` VALUES ('36', '波兰', 'pl');");
-        DB::insert("INSERT INTO `country` VALUES ('37', '哈萨克斯坦', 'kz');");
-        DB::insert("INSERT INTO `country` VALUES ('38', '乌克兰', 'ua');");
-        DB::insert("INSERT INTO `country` VALUES ('39', '罗马尼亚', 'ro');");
-        DB::insert("INSERT INTO `country` VALUES ('40', '阿联酋', 'ae');");
-        DB::insert("INSERT INTO `country` VALUES ('41', '南非', 'za');");
-        DB::insert("INSERT INTO `country` VALUES ('42', '缅甸', 'mm');");
-        DB::insert("INSERT INTO `country` VALUES ('43', '冰岛', 'is');");
-        DB::insert("INSERT INTO `country` VALUES ('44', '芬兰', 'fi');");
-        DB::insert("INSERT INTO `country` VALUES ('45', '卢森堡', 'lu');");
-        DB::insert("INSERT INTO `country` VALUES ('46', '比利时', 'be');");
-        DB::insert("INSERT INTO `country` VALUES ('47', '保加利亚', 'bg');");
-        DB::insert("INSERT INTO `country` VALUES ('48', '立陶宛', 'lt');");
-        DB::insert("INSERT INTO `country` VALUES ('49', '哥伦比亚', 'co');");
-        DB::insert("INSERT INTO `country` VALUES ('50', '澳门', 'mo');");
-        DB::insert("INSERT INTO `country` VALUES ('51', '肯尼亚', 'ke');");
-        DB::insert("INSERT INTO `country` VALUES ('52', '捷克', 'cz');");
-        DB::insert("INSERT INTO `country` VALUES ('53', '摩尔多瓦', 'md');");
-        DB::insert("INSERT INTO `country` VALUES ('54', '西班牙', 'es');");
-        DB::insert("INSERT INTO `country` VALUES ('55', '巴基斯坦', 'pk');");
-        DB::insert("INSERT INTO `country` VALUES ('56', '葡萄牙', 'pt');");
-        DB::insert("INSERT INTO `country` VALUES ('57', '匈牙利', 'hu');");
-        DB::insert("INSERT INTO `country` VALUES ('58', '阿根廷', 'ar');");
-    }
-}

+ 1 - 1
database/seeds/DatabaseSeeder.php

@@ -5,7 +5,7 @@ use Illuminate\Database\Seeder;
 class DatabaseSeeder extends Seeder
 {
     /**
-     * Run the database seeds.
+     * Seed the application's database.
      *
      * @return void
      */

+ 0 - 22
database/seeds/LevelTableSeeder.php

@@ -1,22 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class LevelTableSeeder extends Seeder
-{
-    /**
-     * Run the database seeds.
-     *
-     * @return void
-     */
-    public function run()
-    {
-        DB::insert("INSERT INTO `level` VALUES (1, '1', '倔强青铜', '2017-10-26 15:56:52', '2017-10-26 15:38:58');");
-        DB::insert("INSERT INTO `level` VALUES (2, '2', '秩序白银', '2017-10-26 15:57:30', '2017-10-26 12:37:51');");
-        DB::insert("INSERT INTO `level` VALUES (3, '3', '荣耀黄金', '2017-10-26 15:41:31', '2017-10-26 15:41:31');");
-        DB::insert("INSERT INTO `level` VALUES (4, '4', '尊贵铂金', '2017-10-26 15:41:38', '2017-10-26 15:41:38');");
-        DB::insert("INSERT INTO `level` VALUES (5, '5', '永恒钻石', '2017-10-26 15:41:47', '2017-10-26 15:41:47');");
-        DB::insert("INSERT INTO `level` VALUES (6, '6', '至尊黑曜', '2017-10-26 15:41:56', '2017-10-26 15:41:56');");
-        DB::insert("INSERT INTO `level` VALUES (7, '7', '最强王者', '2017-10-26 15:42:02', '2017-10-26 15:42:02');");
-    }
-}

+ 0 - 52
database/seeds/SsConfigTableSeeder.php

@@ -1,52 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class SsConfigTableSeeder extends Seeder
-{
-    /**
-     * Run the database seeds.
-     *
-     * @return void
-     */
-    public function run()
-    {
-        DB::insert("INSERT INTO `ss_config` VALUES ('1', 'none', '1', '0', '0', '2017-08-01 13:12:23', '2017-08-01 13:12:23');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('2', 'rc4-md5', '1', '0', '0', '2017-08-01 13:12:29', '2017-08-01 13:12:29');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('3', 'bf-cfb', '1', '0', '0', '2017-08-01 13:13:05', '2017-08-01 13:13:05');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('4', 'aes-128-cfb', '1', '0', '0', '2017-08-01 13:13:13', '2017-08-01 13:13:13');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('5', 'aes-192-cfb', '1', '0', '0', '2017-08-01 13:13:25', '2017-08-01 13:13:25');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('6', 'aes-256-cfb', '1', '0', '0', '2017-08-01 13:13:39', '2017-08-01 13:13:39');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('7', 'aes-128-ctr', '1', '0', '0', '2017-08-01 13:13:46', '2017-08-01 13:13:46');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('8', 'aes-192-ctr', '1', '1', '0', '2017-08-01 13:13:53', '2017-08-01 13:13:53');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('9', 'aes-256-ctr', '1', '0', '0', '2017-08-01 13:14:00', '2017-08-01 13:14:00');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('10', 'camellia-128-cfb', '1', '0', '0', '2017-08-01 13:14:08', '2017-08-01 13:14:08');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('11', 'camellia-192-cfb', '1', '0', '0', '2017-08-01 13:14:12', '2017-08-01 13:14:12');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('12', 'camellia-256-cfb', '1', '0', '0', '2017-08-01 13:14:51', '2017-08-01 13:14:51');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('13', 'salsa20', '1', '0', '0', '2017-08-01 13:15:09', '2017-08-01 13:15:09');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('14', 'chacha20', '1', '0', '0', '2017-08-01 13:15:16', '2017-08-01 13:15:16');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('15', 'chacha20-ietf', '1', '0', '0', '2017-08-01 13:15:27', '2017-08-01 13:15:27');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('16', 'chacha20-ietf-poly1305', '1', '0', '0', '2017-08-01 13:15:39', '2017-08-01 13:15:39');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('17', 'chacha20-poly1305', '1', '0', '0', '2017-08-01 13:15:46', '2017-08-01 13:15:46');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('18', 'xchacha-ietf-poly1305', '1', '0', '0', '2017-08-01 13:21:51', '2017-08-01 13:21:51');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('19', 'aes-128-gcm', '1', '0', '0', '2017-08-01 13:22:05', '2017-08-01 13:22:05');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('20', 'aes-192-gcm', '1', '0', '0', '2017-08-01 13:22:12', '2017-08-01 13:22:12');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('21', 'aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:19', '2017-08-01 13:22:19');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('22', 'sodium-aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:32', '2017-08-01 13:22:32');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('23', 'origin', '2', '0', '0', '2017-08-01 13:23:57', '2017-08-01 13:23:57');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('24', 'auth_sha1_v4', '2', '0', '0', '2017-08-01 13:24:41', '2017-08-01 13:24:41');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('25', 'auth_aes128_md5', '2', '0', '0', '2017-08-01 13:24:58', '2017-08-01 13:24:58');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('26', 'auth_aes128_sha1', '2', '0', '0', '2017-08-01 13:25:11', '2017-08-01 13:25:11');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('27', 'auth_chain_a', '2', '1', '0', '2017-08-01 13:25:24', '2017-08-01 13:25:24');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('28', 'auth_chain_b', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('29', 'plain', '3', '0', '0', '2017-08-01 13:29:14', '2017-08-01 13:29:14');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('30', 'http_simple', '3', '0', '0', '2017-08-01 13:29:30', '2017-08-01 13:29:30');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('31', 'http_post', '3', '0', '0', '2017-08-01 13:29:38', '2017-08-01 13:29:38');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('32', 'tls1.2_ticket_auth', '3', '1', '0', '2017-08-01 13:29:51', '2017-08-01 13:29:51');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('33', 'tls1.2_ticket_fastauth', '3', '0', '0', '2017-08-01 14:02:19', '2017-08-01 14:02:19');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('34', 'auth_chain_c', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('35', 'auth_chain_d', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('36', 'auth_chain_e', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');");
-        DB::insert("INSERT INTO `ss_config` VALUES ('37', 'auth_chain_f', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');");
-    }
-}

+ 0 - 53
database/seeds/UserTableSeeder.php

@@ -1,53 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class UserTableSeeder extends Seeder
-{
-    /**
-     * Run the database seeds.
-     *
-     * @return void
-     */
-    public function run()
-    {
-        DB::table('user')->insert([
-            'id'                   => 1,
-            'username'             => 'admin',
-            'password'             => 'e10adc3949ba59abbe56e057f20f883e',
-            'port'                 => 10000,
-            'passwd'               => '@123',
-            'transfer_enable'      => 1073741824000,
-            'u'                    => 0,
-            'd'                    => 0,
-            't'                    => 0,
-            'enable'               => 1,
-            'method'               => 'aes-192-ctr',
-            'protocol'             => 'auth_chain_a',
-            'protocol_param'       => '',
-            'obfs'                 => 'tls1.2_ticket_auth',
-            'obfs_param'           => '',
-            'speed_limit_per_con'  => 204800,
-            'speed_limit_per_user' => 204800,
-            'gender'               => 1,
-            'wechat'               => '',
-            'qq'                   => '',
-            'usage'                => 1,
-            'pay_way'              => 3,
-            'balance'              => '0.00',
-            'score'                => 0,
-            'enable_time'          => date('Y-m-d'),
-            'expire_time'          => '2099-01-01',
-            'ban_time'             => 0,
-            'remark'               => '',
-            'level'                => 1,
-            'is_admin'             => 1,
-            'reg_ip'               => '127.0.0.1',
-            'last_login'           => 0,
-            'referral_uid'         => 0,
-            'traffic_reset_day'    => 0,
-            'status'               => 0,
-            'remember_token'       => ''
-        ]);
-    }
-}

+ 20 - 19
package.json

@@ -1,21 +1,22 @@
 {
-  "private": true,
-  "scripts": {
-    "dev": "npm run development",
-    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
-    "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
-    "watch-poll": "npm run watch -- --watch-poll",
-    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
-    "prod": "npm run production",
-    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
-  },
-  "devDependencies": {
-    "axios": "^0.15.3",
-    "bootstrap-sass": "^3.3.7",
-    "cross-env": "^3.2.3",
-    "jquery": "^3.1.1",
-    "laravel-mix": "0.*",
-    "lodash": "^4.17.4",
-    "vue": "^2.1.10"
-  }
+    "private": true,
+    "scripts": {
+        "dev": "npm run development",
+        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
+        "watch": "npm run development -- --watch",
+        "watch-poll": "npm run watch -- --watch-poll",
+        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
+        "prod": "npm run production",
+        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
+    },
+    "devDependencies": {
+        "axios": "^0.18",
+        "bootstrap": "^4.0.0",
+        "popper.js": "^1.12",
+        "cross-env": "^5.1",
+        "jquery": "^3.2",
+        "laravel-mix": "^2.0",
+        "lodash": "^4.17.4",
+        "vue": "^2.5.7"
+    }
 }

+ 7 - 5
phpunit.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phpunit backupGlobals="false"
          backupStaticAttributes="false"
-         bootstrap="bootstrap/autoload.php"
+         bootstrap="vendor/autoload.php"
          colors="true"
          convertErrorsToExceptions="true"
          convertNoticesToExceptions="true"
@@ -9,13 +9,13 @@
          processIsolation="false"
          stopOnFailure="false">
     <testsuites>
-        <testsuite name="Feature">
-            <directory suffix="Test.php">./tests/Feature</directory>
-        </testsuite>
-
         <testsuite name="Unit">
             <directory suffix="Test.php">./tests/Unit</directory>
         </testsuite>
+
+        <testsuite name="Feature">
+            <directory suffix="Test.php">./tests/Feature</directory>
+        </testsuite>
     </testsuites>
     <filter>
         <whitelist processUncoveredFilesFromWhitelist="true">
@@ -24,8 +24,10 @@
     </filter>
     <php>
         <env name="APP_ENV" value="testing"/>
+        <env name="BCRYPT_ROUNDS" value="4"/>
         <env name="CACHE_DRIVER" value="array"/>
         <env name="SESSION_DRIVER" value="array"/>
         <env name="QUEUE_DRIVER" value="sync"/>
+        <env name="MAIL_DRIVER" value="array"/>
     </php>
 </phpunit>

+ 7 - 6
public/.htaccess

@@ -1,20 +1,21 @@
 <IfModule mod_rewrite.c>
     <IfModule mod_negotiation.c>
-        Options -MultiViews
+        Options -MultiViews -Indexes
     </IfModule>
 
     RewriteEngine On
 
+    # Handle Authorization Header
+    RewriteCond %{HTTP:Authorization} .
+    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
     # Redirect Trailing Slashes If Not A Folder...
     RewriteCond %{REQUEST_FILENAME} !-d
-    RewriteRule ^(.*)/$ /$1 [L,R=301]
+    RewriteCond %{REQUEST_URI} (.+)/$
+    RewriteRule ^ %1 [L,R=301]
 
     # Handle Front Controller...
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^ index.php [L]
-
-    # Handle Authorization Header
-    RewriteCond %{HTTP:Authorization} .
-    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 </IfModule>

+ 3 - 1
public/index.php

@@ -7,6 +7,8 @@
  * @author   Taylor Otwell <[email protected]>
  */
 
+define('LARAVEL_START', microtime(true));
+
 /*
 |--------------------------------------------------------------------------
 | Register The Auto Loader
@@ -19,7 +21,7 @@
 |
 */
 
-require __DIR__.'/../bootstrap/autoload.php';
+require __DIR__.'/../vendor/autoload.php';
 
 /*
 |--------------------------------------------------------------------------

+ 1 - 1
resources/assets/js/app.js

@@ -15,7 +15,7 @@ window.Vue = require('vue');
  * or customize the JavaScript scaffolding to fit your unique needs.
  */
 
-Vue.component('example', require('./components/Example.vue'));
+Vue.component('example-component', require('./components/ExampleComponent.vue'));
 
 const app = new Vue({
     el: '#app'

+ 5 - 2
resources/assets/js/bootstrap.js

@@ -1,5 +1,6 @@
 
 window._ = require('lodash');
+window.Popper = require('popper.js').default;
 
 /**
  * We'll load jQuery and the Bootstrap jQuery plugin which provides support
@@ -10,7 +11,7 @@ window._ = require('lodash');
 try {
     window.$ = window.jQuery = require('jquery');
 
-    require('bootstrap-sass');
+    require('bootstrap');
 } catch (e) {}
 
 /**
@@ -49,5 +50,7 @@ if (token) {
 
 // window.Echo = new Echo({
 //     broadcaster: 'pusher',
-//     key: 'your-pusher-key'
+//     key: process.env.MIX_PUSHER_APP_KEY,
+//     cluster: process.env.MIX_PUSHER_APP_CLUSTER,
+//     encrypted: true
 // });

+ 0 - 23
resources/assets/js/components/Example.vue

@@ -1,23 +0,0 @@
-<template>
-    <div class="container">
-        <div class="row">
-            <div class="col-md-8 col-md-offset-2">
-                <div class="panel panel-default">
-                    <div class="panel-heading">Example Component</div>
-
-                    <div class="panel-body">
-                        I'm an example component!
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script>
-    export default {
-        mounted() {
-            console.log('Component mounted.')
-        }
-    }
-</script>

+ 23 - 0
resources/assets/js/components/ExampleComponent.vue

@@ -0,0 +1,23 @@
+<template>
+    <div class="container">
+        <div class="row justify-content-center">
+            <div class="col-md-8">
+                <div class="card card-default">
+                    <div class="card-header">Example Component</div>
+
+                    <div class="card-body">
+                        I'm an example component.
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+    export default {
+        mounted() {
+            console.log('Component mounted.')
+        }
+    }
+</script>

+ 14 - 32
resources/assets/sass/_variables.scss

@@ -1,38 +1,20 @@
 
 // Body
-$body-bg: #f5f8fa;
-
-// Borders
-$laravel-border-color: darken($body-bg, 10%);
-$list-group-border: $laravel-border-color;
-$navbar-default-border: $laravel-border-color;
-$panel-default-border: $laravel-border-color;
-$panel-inner-border: $laravel-border-color;
-
-// Brands
-$brand-primary: #3097D1;
-$brand-info: #8eb4cb;
-$brand-success: #2ab27b;
-$brand-warning: #cbb956;
-$brand-danger: #bf5329;
+$body-bg: #f8fafc;
 
 // Typography
-$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
-$font-family-sans-serif: "Raleway", sans-serif;
-$font-size-base: 14px;
+$font-family-sans-serif: "Nunito", sans-serif;
+$font-size-base: 0.9rem;
 $line-height-base: 1.6;
-$text-color: #636b6f;
-
-// Navbar
-$navbar-default-bg: #fff;
-
-// Buttons
-$btn-default-color: $text-color;
-
-// Inputs
-$input-border: lighten($text-color, 40%);
-$input-border-focus: lighten($brand-primary, 25%);
-$input-color-placeholder: lighten($text-color, 30%);
 
-// Panels
-$panel-default-heading-bg: #fff;
+// Colors
+$blue: #3490dc;
+$indigo: #6574cd;
+$purple: #9561e2;
+$pink: #f66D9b;
+$red: #e3342f;
+$orange: #f6993f;
+$yellow: #ffed4a;
+$green: #38c172;
+$teal: #4dc0b5;
+$cyan: #6cb2eb;

+ 8 - 3
resources/assets/sass/app.scss

@@ -1,9 +1,14 @@
 
 // Fonts
-@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
+@import url('https://fonts.googleapis.com/css?family=Nunito');
 
 // Variables
-@import "variables";
+@import 'variables';
 
 // Bootstrap
-@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
+@import '~bootstrap/scss/bootstrap';
+
+.navbar-laravel {
+  background-color: #fff;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
+}

+ 1 - 3
tests/Feature/ExampleTest.php

@@ -3,9 +3,7 @@
 namespace Tests\Feature;
 
 use Tests\TestCase;
-use Illuminate\Foundation\Testing\WithoutMiddleware;
-use Illuminate\Foundation\Testing\DatabaseMigrations;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
+use Illuminate\Foundation\Testing\RefreshDatabase;
 
 class ExampleTest extends TestCase
 {

+ 1 - 2
tests/Unit/ExampleTest.php

@@ -3,8 +3,7 @@
 namespace Tests\Unit;
 
 use Tests\TestCase;
-use Illuminate\Foundation\Testing\DatabaseMigrations;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
+use Illuminate\Foundation\Testing\RefreshDatabase;
 
 class ExampleTest extends TestCase
 {

+ 15 - 0
webpack.mix.js

@@ -0,0 +1,15 @@
+let mix = require('laravel-mix');
+
+/*
+ |--------------------------------------------------------------------------
+ | Mix Asset Management
+ |--------------------------------------------------------------------------
+ |
+ | Mix provides a clean, fluent API for defining some Webpack build steps
+ | for your Laravel application. By default, we are compiling the Sass
+ | file for the application as well as bundling up all the JS files.
+ |
+ */
+
+mix.js('resources/assets/js/app.js', 'public/js')
+   .sass('resources/assets/sass/app.scss', 'public/css');