瀏覽代碼

Laravel 9.0 compatibility

baijunyao 3 年之前
父節點
當前提交
935b416d31
共有 100 個文件被更改,包括 5583 次插入4852 次删除
  1. 3 0
      .editorconfig
  2. 15 2
      .env.example
  3. 8 3
      .gitattributes
  4. 8 8
      .github/workflows/CI.yml
  5. 5 5
      .gitignore
  6. 1056 1067
      .phpstorm.meta.php
  7. 0 1
      .styleci.yml
  8. 39 417
      CHANGELOG.md
  9. 2090 996
      _ide_helper.php
  10. 0 9
      app/Console/Kernel.php
  11. 12 3
      app/Exceptions/Handler.php
  12. 6 5
      app/Http/Kernel.php
  13. 5 4
      app/Http/Middleware/RedirectIfAuthenticated.php
  14. 1 0
      app/Http/Middleware/TrimStrings.php
  15. 7 2
      app/Http/Middleware/TrustProxies.php
  16. 5 3
      app/Models/User.php
  17. 13 13
      app/Providers/AppServiceProvider.php
  18. 2 2
      app/Providers/AuthServiceProvider.php
  19. 12 3
      app/Providers/EventServiceProvider.php
  20. 2 3
      app/Providers/ExtensionServiceProvider.php
  21. 6 11
      app/Providers/RouteServiceProvider.php
  22. 1 1
      artisan
  23. 60 59
      composer.json
  24. 1305 1989
      composer.lock
  25. 23 41
      config/app.php
  26. 2 2
      config/auth.php
  27. 9 1
      config/broadcasting.php
  28. 13 7
      config/cache.php
  29. 1 1
      config/cors.php
  30. 14 4
      config/database.php
  31. 6 15
      config/filesystems.php
  32. 3 3
      config/hashing.php
  33. 28 10
      config/logging.php
  34. 11 3
      config/mail.php
  35. 5 1
      config/queue.php
  36. 1 0
      config/services.php
  37. 4 4
      config/session.php
  38. 1 2
      database/.gitignore
  39. 5 10
      database/factories/UserFactory.php
  40. 2 3
      database/migrations/2014_10_12_000000_create_users_table.php
  41. 2 3
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  42. 646 0
      phpstan-baseline.neon
  43. 1 0
      phpstan.neon
  44. 10 8
      phpunit.xml
  45. 7 7
      public/index.php
  46. 4 2
      resources/js/bootstrap.js
  47. 3 1
      tests/Feature/Resources/CategoryControllerTest.php
  48. 2 2
      tests/_baseline/Feature/Auth/ApiControllerTest__testLoginInvalidPassword__1.json
  49. 2 2
      tests/_baseline/Feature/Auth/ApiControllerTest__testLogin__1.json
  50. 2 2
      tests/_baseline/Feature/DashboardControllerTest__testAnalysis__1.json
  51. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testDestroy__1.json
  52. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testForceDelete__1.json
  53. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testIndex__1.json
  54. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testRestore__1.json
  55. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testShow__1.json
  56. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testStore__1.json
  57. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testUpdateClearDescription__1.json
  58. 2 2
      tests/_baseline/Feature/Resources/ArticleControllerTest__testUpdate__1.json
  59. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testDestroy__1.json
  60. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testForceDelete__1.json
  61. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testIndex__1.json
  62. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testRestore__1.json
  63. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testShow__1.json
  64. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testStoreWithUnknownKey__1.json
  65. 2 2
      tests/_baseline/Feature/Resources/CategoryControllerTest__testStore__1.json
  66. 14 11
      tests/_baseline/Feature/Resources/CategoryControllerTest__testUpdate__1.json
  67. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testDestroy__1.json
  68. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testForceDelete__1.json
  69. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testIndex__1.json
  70. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testRestore__1.json
  71. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testShow__1.json
  72. 2 2
      tests/_baseline/Feature/Resources/CommentControllerTest__testUpdate__1.json
  73. 2 2
      tests/_baseline/Feature/Resources/ConfigControllerTest__testIndex__1.json
  74. 2 2
      tests/_baseline/Feature/Resources/ConfigControllerTest__testShow__1.json
  75. 2 2
      tests/_baseline/Feature/Resources/ConfigControllerTest__testUpdate__1.json
  76. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testDestroy__1.json
  77. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testForceDelete__1.json
  78. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testIndex__1.json
  79. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testRestore__1.json
  80. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testShow__1.json
  81. 3 3
      tests/_baseline/Feature/Resources/FriendControllerTest__testStoreValidation__1.json
  82. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testStore__1.json
  83. 3 3
      tests/_baseline/Feature/Resources/FriendControllerTest__testUpdateValidation__1.json
  84. 2 2
      tests/_baseline/Feature/Resources/FriendControllerTest__testUpdate__1.json
  85. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testDestroy__1.json
  86. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testForceDelete__1.json
  87. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testIndex__1.json
  88. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testRestore__1.json
  89. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testShow__1.json
  90. 3 3
      tests/_baseline/Feature/Resources/NavControllerTest__testStoreValidation__1.json
  91. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testStore__1.json
  92. 3 3
      tests/_baseline/Feature/Resources/NavControllerTest__testUpdateValidation__1.json
  93. 2 2
      tests/_baseline/Feature/Resources/NavControllerTest__testUpdate__1.json
  94. 2 2
      tests/_baseline/Feature/Resources/NoteControllerTest__testDestroy__1.json
  95. 2 2
      tests/_baseline/Feature/Resources/NoteControllerTest__testForceDelete__1.json
  96. 2 2
      tests/_baseline/Feature/Resources/NoteControllerTest__testIndex__1.json
  97. 2 2
      tests/_baseline/Feature/Resources/NoteControllerTest__testRestore__1.json
  98. 2 2
      tests/_baseline/Feature/Resources/NoteControllerTest__testShow__1.json
  99. 3 3
      tests/_baseline/Feature/Resources/NoteControllerTest__testStoreValidation__1.json
  100. 0 0
      tests/_baseline/Feature/Resources/NoteControllerTest__testStore__1.json

+ 3 - 0
.editorconfig

@@ -13,3 +13,6 @@ trim_trailing_whitespace = false
 
 [*.{yml,yaml}]
 indent_size = 2
+
+[docker-compose.yml]
+indent_size = 4

+ 15 - 2
.env.example

@@ -5,6 +5,8 @@ APP_DEBUG=true
 APP_URL=http://laravel-bjyblog.test
 
 LOG_CHANNEL=stack
+LOG_DEPRECATIONS_CHANNEL=null
+LOG_LEVEL=debug
 
 DB_CONNECTION=mysql
 DB_HOST=127.0.0.1
@@ -18,22 +20,33 @@ OLD_DB_PORT=3306
 OLD_DB_DATABASE=oldblog
 OLD_DB_USERNAME=root
 OLD_DB_PASSWORD=
-
 BROADCAST_DRIVER=log
 CACHE_DRIVER=file
+FILESYSTEM_DISK=local
 QUEUE_CONNECTION=sync
 SESSION_DRIVER=file
 SESSION_LIFETIME=120
-SESSION_DOMAIN=
+
+MEMCACHED_HOST=127.0.0.1
 
 REDIS_HOST=127.0.0.1
 REDIS_PASSWORD=null
 REDIS_PORT=6379
 
+MAIL_MAILER=smtp
+MAIL_HOST=mailhog
+MAIL_PORT=1025
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+MAIL_ENCRYPTION=null
+MAIL_FROM_ADDRESS="hello@example.com"
+MAIL_FROM_NAME="${APP_NAME}"
+
 AWS_ACCESS_KEY_ID=
 AWS_SECRET_ACCESS_KEY=
 AWS_DEFAULT_REGION=us-east-1
 AWS_BUCKET=
+AWS_USE_PATH_STYLE_ENDPOINT=false
 
 PUSHER_APP_ID=
 PUSHER_APP_KEY=

+ 8 - 3
.gitattributes

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

+ 8 - 8
.github/workflows/CI.yml

@@ -43,7 +43,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -71,7 +71,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -130,7 +130,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -169,7 +169,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -208,7 +208,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -251,7 +251,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -290,7 +290,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial
@@ -329,7 +329,7 @@ jobs:
       - uses: actions/cache@v1
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
-          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+          key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
           restore-keys: |
             ${{ runner.os }}-composer-
       - name: Initial

+ 5 - 5
.gitignore

@@ -1,18 +1,18 @@
 /node_modules
 /public/hot
 /public/storage
-/public/uploads
 /storage/*.key
 /vendor
-/.idea
-/.vagrant
+.env
+.env.backup
 .phpunit.result.cache
 Homestead.json
 Homestead.yaml
 npm-debug.log
 yarn-error.log
-.env
-.env.backup
+/.idea
+/.vscode
+/public/uploads
 .user.ini
 /public/Demo/*
 phpunit.dusk.xml

文件差異過大導致無法顯示
+ 1056 - 1067
.phpstorm.meta.php


+ 0 - 1
.styleci.yml

@@ -5,7 +5,6 @@ php:
   finder:
     not-name:
       - index.php
-      - server.php
 js:
   finder:
     not-name:

文件差異過大導致無法顯示
+ 39 - 417
CHANGELOG.md


文件差異過大導致無法顯示
+ 2090 - 996
_ide_helper.php


+ 0 - 9
app/Console/Kernel.php

@@ -8,15 +8,6 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 class Kernel extends ConsoleKernel
 {
     /**
-     * The Artisan commands provided by your application.
-     *
-     * @var array<int,string>
-     */
-    protected $commands = [
-        //
-    ];
-
-    /**
      * Define the application's command schedule.
      *
      * @param  \Illuminate\Console\Scheduling\Schedule  $schedule

+ 12 - 3
app/Exceptions/Handler.php

@@ -10,19 +10,28 @@ use Throwable;
 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.
      *
-     * @var array<int,string>
+     * @var array<int, class-string<\Throwable>>
      */
     protected $dontReport = [
     ];
 
     /**
-     * A list of the inputs that are never flashed for validation exceptions.
+     * A list of the inputs that are never flashed to the session on validation exceptions.
      *
-     * @var array<int,string>
+     * @var array<int, string>
      */
     protected $dontFlash = [
+        'current_password',
         'password',
         'password_confirmation',
     ];

+ 6 - 5
app/Http/Kernel.php

@@ -11,12 +11,12 @@ class Kernel extends HttpKernel
      *
      * These middleware are run during every request to your application.
      *
-     * @var array<int,string>
+     * @var array<int, class-string|string>
      */
     protected $middleware = [
         // \App\Http\Middleware\TrustHosts::class,
         \App\Http\Middleware\TrustProxies::class,
-        \Fruitcake\Cors\HandleCors::class,
+        \Illuminate\Http\Middleware\HandleCors::class,
         \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
         \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
         \App\Http\Middleware\TrimStrings::class,
@@ -26,20 +26,20 @@ class Kernel extends HttpKernel
     /**
      * The application's route middleware groups.
      *
-     * @var array<string,array<int,string>>
+     * @var array<string, array<int, class-string|string>>
      */
     protected $middlewareGroups = [
         'web' => [
             \App\Http\Middleware\EncryptCookies::class,
             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
             \Illuminate\Session\Middleware\StartSession::class,
-            // \Illuminate\Session\Middleware\AuthenticateSession::class,
             \Illuminate\View\Middleware\ShareErrorsFromSession::class,
             \App\Http\Middleware\VerifyCsrfToken::class,
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
         ],
 
         'api' => [
+            // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
             'throttle:api',
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
         ],
@@ -50,11 +50,12 @@ class Kernel extends HttpKernel
      *
      * These middleware may be assigned to groups or used individually.
      *
-     * @var array<string,class-string>
+     * @var array<string, class-string|string>
      */
     protected $routeMiddleware = [
         'auth' => \App\Http\Middleware\Authenticate::class,
         'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+        'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
         'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
         'can' => \Illuminate\Auth\Middleware\Authorize::class,
         'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,

+ 5 - 4
app/Http/Middleware/RedirectIfAuthenticated.php

@@ -6,6 +6,7 @@ namespace App\Http\Middleware;
 
 use App\Providers\RouteServiceProvider;
 use Closure;
+use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Auth;
 
 class RedirectIfAuthenticated
@@ -13,12 +14,12 @@ class RedirectIfAuthenticated
     /**
      * Handle an incoming request.
      *
-     * @param \Illuminate\Http\Request $request
-     * @param string|null              ...$guards
+     * @param  \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse)  $next
+     * @param string|null ...$guards
      *
-     * @return mixed
+     * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
      */
-    public function handle($request, Closure $next, ...$guards)
+    public function handle(Request $request, Closure $next, ...$guards)
     {
         $guards = empty($guards) ? [null] : $guards;
 

+ 1 - 0
app/Http/Middleware/TrimStrings.php

@@ -14,6 +14,7 @@ class TrimStrings extends Middleware
      * @var array<int,string>
      */
     protected $except = [
+        'current_password',
         'password',
         'password_confirmation',
     ];

+ 7 - 2
app/Http/Middleware/TrustProxies.php

@@ -4,7 +4,7 @@ declare(strict_types=1);
 
 namespace App\Http\Middleware;
 
-use Fideloper\Proxy\TrustProxies as Middleware;
+use Illuminate\Http\Middleware\TrustProxies as Middleware;
 use Illuminate\Http\Request;
 
 class TrustProxies extends Middleware
@@ -23,5 +23,10 @@ class TrustProxies extends Middleware
      *
      * @var int
      */
-    protected $headers = Request::HEADER_X_FORWARDED_ALL;
+    protected $headers =
+        Request::HEADER_X_FORWARDED_FOR |
+        Request::HEADER_X_FORWARDED_HOST |
+        Request::HEADER_X_FORWARDED_PORT |
+        Request::HEADER_X_FORWARDED_PROTO |
+        Request::HEADER_X_FORWARDED_AWS_ELB;
 }

+ 5 - 3
app/Models/User.php

@@ -7,7 +7,9 @@ namespace App\Models;
 class User extends UserBase
 {
     /**
-     * @var array<int,string>
+     * The attributes that are mass assignable.
+     *
+     * @var array<int, string>
      */
     protected $fillable = [
         'name',
@@ -19,7 +21,7 @@ class User extends UserBase
     ];
 
     /**
-     * The attributes that should be hidden for arrays.
+     * The attributes that should be hidden for serialization.
      *
      * @var array<int,string>
      */
@@ -29,7 +31,7 @@ class User extends UserBase
     ];
 
     /**
-     * The attributes that should be cast to native types.
+     * The attributes that should be cast.
      *
      * @var array<string,string>
      */

+ 13 - 13
app/Providers/AppServiceProvider.php

@@ -13,6 +13,19 @@ use Illuminate\Support\ServiceProvider;
 class AppServiceProvider extends ServiceProvider
 {
     /**
+     * Register any application services.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        if ($this->app->environment() !== 'production') {
+            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
+            $this->app->register(\Clockwork\Support\Laravel\ClockworkServiceProvider::class);
+        }
+    }
+
+    /**
      * Bootstrap any application services.
      *
      * @return void
@@ -39,17 +52,4 @@ class AppServiceProvider extends ServiceProvider
         $contextual_binding_builder->needs('$region')->giveConfig('services.tencent_cloud.region');
         $contextual_binding_builder->needs('$project_id')->giveConfig('services.tencent_cloud.project_id');
     }
-
-    /**
-     * Register any application services.
-     *
-     * @return void
-     */
-    public function register()
-    {
-        if ($this->app->environment() !== 'production') {
-            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
-            $this->app->register(\Clockwork\Support\Laravel\ClockworkServiceProvider::class);
-        }
-    }
 }

+ 2 - 2
app/Providers/AuthServiceProvider.php

@@ -10,9 +10,9 @@ use Laravel\Passport\Passport;
 class AuthServiceProvider extends ServiceProvider
 {
     /**
-     * The policy mappings for the application.
+     * The model to policy mappings for the application.
      *
-     * @var array<string,string>
+     * @var array<class-string, class-string>
      */
     protected $policies = [
         // 'App\Models\Model' => 'App\Policies\ModelPolicy',

+ 12 - 3
app/Providers/EventServiceProvider.php

@@ -10,9 +10,9 @@ use Illuminate\Support\Facades\Event;
 class EventServiceProvider extends ServiceProvider
 {
     /**
-     * The event listener mappings for the application.
+     * The event to listener mappings for the application.
      *
-     * @var array<string,array<int,string>>
+     * @var array<class-string, array<int, class-string>>
      */
     protected $listen = [
         \SocialiteProviders\Manager\SocialiteWasCalled::class => [
@@ -29,6 +29,15 @@ class EventServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        parent::boot();
+    }
+
+    /**
+     * Determine if events and listeners should be automatically discovered.
+     *
+     * @return bool
+     */
+    public function shouldDiscoverEvents()
+    {
+        return false;
     }
 }

+ 2 - 3
app/Providers/ExtensionServiceProvider.php

@@ -4,7 +4,6 @@ declare(strict_types=1);
 
 namespace App\Providers;
 
-use App\Extensions\Illuminate\Foundation\Console\TestMakeCommand;
 use Illuminate\Support\ServiceProvider;
 
 class ExtensionServiceProvider extends ServiceProvider
@@ -25,8 +24,8 @@ class ExtensionServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        $this->app->extend('command.test.make', function ($command, $app) {
-            return new TestMakeCommand($app['files']);
+        $this->app->extend(\Illuminate\Foundation\Console\TestMakeCommand::class, function ($command, $app) {
+            return new \App\Extensions\Illuminate\Foundation\Console\TestMakeCommand($app['files']);
         });
     }
 }

+ 6 - 11
app/Providers/RouteServiceProvider.php

@@ -16,20 +16,13 @@ class RouteServiceProvider extends ServiceProvider
     /**
      * The path to the "home" route for your application.
      *
-     * This is used by Laravel authentication to redirect users after login.
+     * Typically, users are redirected here after authentication.
      *
      * @var string
      */
     public const HOME = '/home';
 
     /**
-     * The controller namespace for the application.
-     *
-     * @var string|null
-     */
-    // protected $namespace = 'App\\Http\\Controllers';
-
-    /**
      * Define your route model bindings, pattern filters, etc.
      *
      * @return void
@@ -39,11 +32,13 @@ class RouteServiceProvider extends ServiceProvider
         $this->configureRateLimiting();
 
         $this->routes(function () {
-            Route::prefix('api')
-                ->middleware('api')
+            Route::middleware('api')
+                ->prefix('api')
+                ->namespace($this->namespace)
                 ->group(base_path('routes/api.php'));
 
             Route::middleware('web')
+                ->namespace($this->namespace)
                 ->group(base_path('routes/web.php'));
 
             Route::middleware('web')
@@ -72,7 +67,7 @@ class RouteServiceProvider extends ServiceProvider
     protected function configureRateLimiting()
     {
         RateLimiter::for('api', function (Request $request) {
-            return Limit::perMinute(60);
+            return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
         });
     }
 }

+ 1 - 1
artisan

@@ -11,7 +11,7 @@ define('LARAVEL_START', microtime(true));
 | Composer provides a convenient, automatically generated class loader
 | 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
-| loading of any our classes "manually". Feels great to relax.
+| loading of any of our classes manually. It's great to relax.
 |
 */
 

+ 60 - 59
composer.json

@@ -1,7 +1,9 @@
 {
     "name": "baijunyao/laravel-bjyblog",
+    "type": "project",
     "description": "Laravel blog.",
     "keywords": ["laravel", "blog", "php"],
+    "license": "MIT",
     "authors": [
         {
             "name": "baijunyao",
@@ -10,31 +12,27 @@
             "role": "Developer"
         }
     ],
-    "license": "MIT",
-    "type": "project",
     "require": {
-        "php": "^8.0",
+        "php": "^8.0.2",
         "algolia/algoliasearch-client-php": "^2.5",
         "baidu/aip-sdk": "dev-master#84e5936eb6426b4cc9d9a96848568b9dd527b4a0",
-        "baijunyao/laravel-restful": "^5.0",
-        "baijunyao/laravel-scout-elasticsearch": "^5.0",
-        "baijunyao/laravel-support": "^1.4",
+        "baijunyao/laravel-restful": "^6.1",
+        "baijunyao/laravel-scout-elasticsearch": "^5.3",
+        "baijunyao/laravel-support": "^1.5",
         "composer/semver": "^3.0",
         "davejamesmiller/laravel-breadcrumbs": "^5.3",
         "doctrine/dbal": "^2.5",
-        "fideloper/proxy": "^4.2",
-        "fruitcake/laravel-cors": "^2.0",
-        "genealabs/laravel-model-caching": "^0.11",
+        "genealabs/laravel-model-caching": "^0.12",
         "graham-campbell/markdown": "14.0.x-dev",
-        "guzzlehttp/guzzle": "^7.0.1",
-        "iidestiny/laravel-filesystem-oss": "^2.0",
+        "guzzlehttp/guzzle": "^7.2",
+        "iidestiny/laravel-filesystem-oss": "^3.1",
         "intervention/image": "^2.4",
         "jenssegers/agent": "^2.6",
         "kalnoy/nestedset": "^6.0",
-        "laravel/framework": "^8.0",
+        "laravel/framework": "^9.11",
         "laravel/passport": "^10.0",
         "laravel/socialite": "^5.0",
-        "laravel/tinker": "^2.0",
+        "laravel/tinker": "^2.7",
         "league/html-to-markdown": "^4.6",
         "mews/purifier": "^3.0",
         "overtrue/laravel-follow": "^1.1",
@@ -42,48 +40,27 @@
         "predis/predis": "^1.1",
         "sentry/sentry-laravel": "^2.3",
         "socialiteproviders/qq": "^4.1",
-        "socialiteproviders/vkontakte": "^4.2",
+        "socialiteproviders/vkontakte": "^4.2.2",
         "socialiteproviders/weibo": "^4.1",
         "spatie/laravel-feed": "^4.1",
         "symfony/filesystem": "^5.1",
         "tencentcloud/cvm": "^3.0",
         "tencentcloud/tmt": "^3.0",
-        "ytake/laravel-fluent-logger": "^5.0"
+        "ytake/laravel-fluent-logger": "dev-main#de6041edab0617d876f99c9c1a58033787f4a890"
     },
     "require-dev": {
         "baijunyao/laravel-test-support": "^8.0",
         "baijunyao/php-cs-fixer-config": "^0.1.0",
         "barryvdh/laravel-ide-helper": "^2.4",
-        "beyondcode/laravel-dump-server": "^1.0",
-        "facade/ignition": "^2.3.6",
         "fakerphp/faker": "^1.9.1",
         "filp/whoops": "^2.0",
         "itsgoingd/clockwork": "^5.0",
-        "mockery/mockery": "^1.3.1",
-        "nunomaduro/collision": "^5.0",
-        "nunomaduro/larastan": "^0.6",
-        "phpunit/phpunit": "^9.3",
-        "roave/security-advisories": "dev-latest"
-    },
-    "config": {
-        "optimize-autoloader": true,
-        "preferred-install": "dist",
-        "process-timeout": 0,
-        "sort-packages": true
-    },
-    "repositories": [
-        {
-            "name": "spatie/phpunit-snapshot-assertions",
-            "type": "vcs",
-            "url": "https://github.com/baijunyao/phpunit-snapshot-assertions"
-        }
-    ],
-    "extra": {
-        "laravel": {
-            "dont-discover": [
-                "itsgoingd/clockwork"
-            ]
-        }
+        "mockery/mockery": "^1.4.4",
+        "nunomaduro/collision": "^6.1",
+        "nunomaduro/larastan": "^2.0",
+        "phpunit/phpunit": "^9.5.10",
+        "roave/security-advisories": "dev-latest",
+        "spatie/laravel-ignition": "^1.0"
     },
     "autoload": {
         "psr-4": {
@@ -105,9 +82,22 @@
             "Tests\\": "tests/"
         }
     },
-    "minimum-stability": "dev",
-    "prefer-stable": true,
     "scripts": {
+        "post-autoload-dump": [
+            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
+            "@php artisan package:discover --ansi"
+        ],
+        "post-update-cmd": [
+            "@php artisan vendor:publish --tag=laravel-assets --ansi --force",
+            "@php artisan ide-helper:generate",
+            "@php artisan ide-helper:meta"
+        ],
+        "post-root-package-install": [
+            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
+        ],
+        "post-create-project-cmd": [
+            "@php artisan key:generate --ansi"
+        ],
         "phpcs": "vendor/bin/php-cs-fixer fix",
         "phpstan": "vendor/bin/phpstan analyse --ansi",
         "lint": [
@@ -122,20 +112,31 @@
         "test:coverage-xml": [
             "@putenv XDEBUG_MODE=coverage",
             "./vendor/bin/phpunit --coverage-clover storage/framework/testing/coverage.xml"
-        ],
-        "post-autoload-dump": [
-            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
-            "@php artisan package:discover --ansi"
-        ],
-        "post-root-package-install": [
-            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
-        ],
-        "post-create-project-cmd": [
-            "@php artisan key:generate --ansi"
-        ],
-        "post-update-cmd": [
-            "@php artisan ide-helper:generate",
-            "@php artisan ide-helper:meta"
         ]
-    }
+    },
+    "extra": {
+        "laravel": {
+            "dont-discover": [
+                "itsgoingd/clockwork"
+            ]
+        }
+    },
+    "config": {
+        "optimize-autoloader": true,
+        "preferred-install": "dist",
+        "sort-packages": true,
+        "platform": {
+            "php": "8.0.2"
+        },
+        "process-timeout": 0
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "repositories": [
+        {
+            "name": "spatie/phpunit-snapshot-assertions",
+            "type": "vcs",
+            "url": "https://github.com/baijunyao/phpunit-snapshot-assertions"
+        }
+    ]
 }

文件差異過大導致無法顯示
+ 1305 - 1989
composer.lock


+ 23 - 41
config/app.php

@@ -1,5 +1,7 @@
 <?php
 
+use Illuminate\Support\Facades\Facade;
+
 return [
 
     /*
@@ -54,7 +56,7 @@ return [
 
     'url' => env('APP_URL', 'http://localhost'),
 
-    'asset_url' => env('ASSET_URL', null),
+    'asset_url' => env('ASSET_URL'),
 
     /*
     |--------------------------------------------------------------------------
@@ -125,6 +127,24 @@ return [
 
     /*
     |--------------------------------------------------------------------------
+    | 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
     |--------------------------------------------------------------------------
     |
@@ -215,47 +235,9 @@ 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,
-        '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,
-        '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,
-        'Image' => Intervention\Image\Facades\Image::class,
+    'aliases' => Facade::defaultAliases()->merge([
         'Socialite' => Laravel\Socialite\Facades\Socialite::class,
         'Markdown' => GrahamCampbell\Markdown\Facades\Markdown::class,
-    ],
+    ])->toArray(),
 
 ];

+ 2 - 2
config/auth.php

@@ -31,7 +31,7 @@ return [
     | users are actually retrieved out of your database or other storage
     | mechanisms used by this application to persist your user's data.
     |
-    | Supported: "session", "token"
+    | Supported: "session"
     |
     */
 
@@ -101,7 +101,7 @@ return [
     | than one user table or model in the application and you want to have
     | 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
     | they have less time to be guessed. You may change this as needed.
     |

+ 9 - 1
config/broadcasting.php

@@ -11,7 +11,7 @@ return [
     | framework when an event needs to be broadcast. You may set this to
     | any of the connections defined in the "connections" array below.
     |
-    | Supported: "pusher", "redis", "log", "null"
+    | Supported: "pusher", "ably", "redis", "log", "null"
     |
     */
 
@@ -39,6 +39,14 @@ return [
                 'cluster' => env('PUSHER_APP_CLUSTER'),
                 'useTLS' => true,
             ],
+            'client_options' => [
+                // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
+            ],
+        ],
+
+        'ably' => [
+            'driver' => 'ably',
+            'key' => env('ABLY_KEY'),
         ],
 
         'redis' => [

+ 13 - 7
config/cache.php

@@ -13,9 +13,6 @@ return [
     | using this caching library. This connection is used when another is
     | not explicitly specified when executing a given caching function.
     |
-    | Supported: "apc", "array", "database", "file",
-    |            "memcached", "redis", "dynamodb"
-    |
     */
 
     'default' => env('CACHE_DRIVER', 'file'),
@@ -29,6 +26,9 @@ return [
     | well as their drivers. You may even define multiple stores for the
     | same cache driver to group types of items stored in your caches.
     |
+    | Supported drivers: "apc", "array", "database", "file",
+    |         "memcached", "redis", "dynamodb", "octane", "null"
+    |
     */
 
     'stores' => [
@@ -46,6 +46,7 @@ return [
             'driver' => 'database',
             'table' => 'cache',
             'connection' => null,
+            'lock_connection' => null,
         ],
 
         'file' => [
@@ -75,6 +76,7 @@ return [
         'redis' => [
             'driver' => 'redis',
             'connection' => 'cache',
+            'lock_connection' => 'default',
         ],
 
         'dynamodb' => [
@@ -86,6 +88,10 @@ return [
             'endpoint' => env('DYNAMODB_ENDPOINT'),
         ],
 
+        'octane' => [
+            'driver' => 'octane',
+        ],
+
     ],
 
     /*
@@ -93,12 +99,12 @@ return [
     | 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' => ['*'],
 

+ 14 - 4
config/database.php

@@ -55,8 +55,8 @@ return [
             'charset' => 'utf8',
             'collation' => 'utf8_unicode_ci',
             'prefix' => 'bjy_',
-            'strict' => false,
             'prefix_indexes' => true,
+            'strict' => false,
             'engine' => null,
             'options' => extension_loaded('pdo_mysql') ? array_filter([
                 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
@@ -74,7 +74,7 @@ return [
             'charset' => 'utf8',
             'prefix' => '',
             'prefix_indexes' => true,
-            'schema' => 'public',
+            'search_path' => 'public',
             'sslmode' => 'prefer',
         ],
 
@@ -101,8 +101,12 @@ return [
             'charset' => 'utf8',
             'collation' => 'utf8_unicode_ci',
             'prefix' => 'bjy_',
+            'prefix_indexes' => true,
             'strict' => false,
             'engine' => null,
+            'options' => extension_loaded('pdo_mysql') ? array_filter([
+                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+            ]) : [],
         ],
 
         'testing' => [
@@ -116,8 +120,12 @@ return [
             'charset' => 'utf8',
             'collation' => 'utf8_unicode_ci',
             'prefix' => 'bjy_',
+            'prefix_indexes' => true,
             'strict' => false,
             'engine' => null,
+            'options' => extension_loaded('pdo_mysql') ? array_filter([
+                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+            ]) : [],
         ],
     ],
 
@@ -157,7 +165,8 @@ return [
         'default' => [
             'url' => env('REDIS_URL'),
             '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'),
             'database' => env('REDIS_DB', '0'),
         ],
@@ -165,7 +174,8 @@ return [
         'cache' => [
             'url' => env('REDIS_URL'),
             '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'),
             'database' => env('REDIS_CACHE_DB', '1'),
         ],

+ 6 - 15
config/filesystems.php

@@ -13,20 +13,7 @@ return [
     |
     */
 
-    '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'),
+    'default' => env('FILESYSTEM_DISK', 'local'),
 
     /*
     |--------------------------------------------------------------------------
@@ -35,7 +22,7 @@ return [
     |
     | Here you may configure as many filesystem "disks" as you wish, and you
     | may even configure multiple disks of the same driver. Defaults have
-    | been setup for each driver as an example of the required options.
+    | been set up for each driver as an example of the required values.
     |
     | Supported Drivers: "local", "ftp", "sftp", "s3"
     |
@@ -46,6 +33,7 @@ return [
         'local' => [
             'driver' => 'local',
             'root' => storage_path('app'),
+            'throw' => false,
         ],
 
         'public' => [
@@ -53,6 +41,7 @@ return [
             'root' => storage_path('app/public'),
             'url' => env('APP_URL').'/storage',
             'visibility' => 'public',
+            'throw' => false,
         ],
 
         's3' => [
@@ -63,6 +52,8 @@ return [
             'bucket' => env('AWS_BUCKET'),
             'url' => env('AWS_URL'),
             'endpoint' => env('AWS_ENDPOINT'),
+            'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
+            'throw' => false,
         ],
 
         'oss_backups' => [

+ 3 - 3
config/hashing.php

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

+ 28 - 10
config/logging.php

@@ -17,7 +17,23 @@ return [
     |
     */
 
-    'default' => env('LOG_CHANNEL', 'daily'),
+    'default' => env('LOG_CHANNEL', 'stack'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Deprecations Log Channel
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the log channel that should be used to log warnings
+    | regarding deprecated PHP and library features. This allows you to get
+    | your application ready for upcoming major versions of dependencies.
+    |
+    */
+
+    'deprecations' => [
+        'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
+        'trace' => false,
+    ],
 
     /*
     |--------------------------------------------------------------------------
@@ -37,21 +53,21 @@ return [
     'channels' => [
         'stack' => [
             'driver' => 'stack',
-            'channels' => ['daily'],
+            'channels' => ['single'],
             'ignore_exceptions' => false,
         ],
 
         'single' => [
             'driver' => 'single',
             'path' => storage_path('logs/laravel.log'),
-            'level' => 'debug',
+            'level' => env('LOG_LEVEL', 'debug'),
         ],
 
         'daily' => [
             'driver' => 'daily',
             'path' => storage_path('logs/laravel.log'),
-            'level' => 'debug',
-            'days' => 365,
+            'level' => env('LOG_LEVEL', 'debug'),
+            'days' => 14,
         ],
 
         'slack' => [
@@ -59,21 +75,23 @@ return [
             'url' => env('LOG_SLACK_WEBHOOK_URL'),
             'username' => 'Laravel Log',
             'emoji' => ':boom:',
-            'level' => 'critical',
+            'level' => env('LOG_LEVEL', 'critical'),
         ],
 
         'papertrail' => [
             'driver' => 'monolog',
-            'level' => 'debug',
-            'handler' => SyslogUdpHandler::class,
+            'level' => env('LOG_LEVEL', 'debug'),
+            'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
             'handler_with' => [
                 'host' => env('PAPERTRAIL_URL'),
                 'port' => env('PAPERTRAIL_PORT'),
+                'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
             ],
         ],
 
         'stderr' => [
             'driver' => 'monolog',
+            'level' => env('LOG_LEVEL', 'debug'),
             'handler' => StreamHandler::class,
             'formatter' => env('LOG_STDERR_FORMATTER'),
             'with' => [
@@ -83,12 +101,12 @@ return [
 
         'syslog' => [
             'driver' => 'syslog',
-            'level' => 'debug',
+            'level' => env('LOG_LEVEL', 'debug'),
         ],
 
         'errorlog' => [
             'driver' => 'errorlog',
-            'level' => 'debug',
+            'level' => env('LOG_LEVEL', 'debug'),
         ],
 
         'null' => [

+ 11 - 3
config/mail.php

@@ -29,7 +29,7 @@ return [
     | mailers below. You are free to add additional mailers as required.
     |
     | Supported: "smtp", "sendmail", "mailgun", "ses",
-    |            "postmark", "log", "array"
+    |            "postmark", "log", "array", "failover"
     |
     */
 
@@ -42,7 +42,7 @@ return [
             'username' => env('MAIL_USERNAME'),
             'password' => env('MAIL_PASSWORD'),
             'timeout' => null,
-            'auth_mode' => null,
+            'local_domain' => env('MAIL_EHLO_DOMAIN'),
         ],
 
         'ses' => [
@@ -59,7 +59,7 @@ return [
 
         'sendmail' => [
             'transport' => 'sendmail',
-            'path' => '/usr/sbin/sendmail -bs',
+            'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
         ],
 
         'log' => [
@@ -70,6 +70,14 @@ return [
         'array' => [
             'transport' => 'array',
         ],
+
+        'failover' => [
+            'transport' => 'failover',
+            'mailers' => [
+                'smtp',
+                'log',
+            ],
+        ],
     ],
 
     /*

+ 5 - 1
config/queue.php

@@ -39,6 +39,7 @@ return [
             'table' => 'jobs',
             'queue' => 'default',
             'retry_after' => 90,
+            'after_commit' => false,
         ],
 
         'beanstalkd' => [
@@ -47,6 +48,7 @@ return [
             'queue' => 'default',
             'retry_after' => 90,
             'block_for' => 0,
+            'after_commit' => false,
         ],
 
         'sqs' => [
@@ -54,9 +56,10 @@ return [
             'key' => env('AWS_ACCESS_KEY_ID'),
             'secret' => env('AWS_SECRET_ACCESS_KEY'),
             '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'),
             'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+            'after_commit' => false,
         ],
 
         'redis' => [
@@ -65,6 +68,7 @@ return [
             'queue' => env('REDIS_QUEUE', 'default'),
             'retry_after' => 90,
             'block_for' => null,
+            'after_commit' => false,
         ],
 
     ],

+ 1 - 0
config/services.php

@@ -18,6 +18,7 @@ return [
         'domain' => env('MAILGUN_DOMAIN'),
         'secret' => env('MAILGUN_SECRET'),
         'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+        'scheme' => 'https',
     ],
 
     'postmark' => [

+ 4 - 4
config/session.php

@@ -72,7 +72,7 @@ return [
     |
     */
 
-    'connection' => env('SESSION_CONNECTION', null),
+    'connection' => env('SESSION_CONNECTION'),
 
     /*
     |--------------------------------------------------------------------------
@@ -100,7 +100,7 @@ return [
     |
     */
 
-    'store' => env('SESSION_STORE', null),
+    'store' => env('SESSION_STORE'),
 
     /*
     |--------------------------------------------------------------------------
@@ -155,7 +155,7 @@ return [
     |
     */
 
-    'domain' => env('SESSION_DOMAIN', null),
+    'domain' => env('SESSION_DOMAIN'),
 
     /*
     |--------------------------------------------------------------------------
@@ -164,7 +164,7 @@ return [
     |
     | 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
-    | 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.
     |
     */
 

+ 1 - 2
database/.gitignore

@@ -1,2 +1 @@
-*.sqlite
-*.sqlite-journal
+*.sqlite*

+ 5 - 10
database/factories/UserFactory.php

@@ -2,23 +2,18 @@
 
 namespace Database\Factories;
 
-use App\Models\User;
 use Illuminate\Database\Eloquent\Factories\Factory;
 use Illuminate\Support\Str;
 
+/**
+ * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
+ */
 class UserFactory extends Factory
 {
     /**
-     * The name of the factory's corresponding model.
-     *
-     * @var string
-     */
-    protected $model = User::class;
-
-    /**
      * Define the model's default state.
      *
-     * @return array
+     * @return array<string, mixed>
      */
     public function definition()
     {
@@ -34,7 +29,7 @@ class UserFactory extends Factory
     /**
      * Indicate that the model's email address should be unverified.
      *
-     * @return \Illuminate\Database\Eloquent\Factories\Factory
+     * @return static
      */
     public function unverified()
     {

+ 2 - 3
database/migrations/2014_10_12_000000_create_users_table.php

@@ -6,8 +6,7 @@ use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Facades\Schema;
 
-class CreateUsersTable extends Migration
-{
+return new class() extends Migration {
     /**
      * Run the migrations.
      *
@@ -36,4 +35,4 @@ class CreateUsersTable extends Migration
     {
         Schema::dropIfExists('users');
     }
-}
+};

+ 2 - 3
database/migrations/2014_10_12_100000_create_password_resets_table.php

@@ -6,8 +6,7 @@ use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Facades\Schema;
 
-class CreatePasswordResetsTable extends Migration
-{
+return new class() extends Migration {
     /**
      * Run the migrations.
      *
@@ -31,4 +30,4 @@ class CreatePasswordResetsTable extends Migration
     {
         Schema::dropIfExists('password_resets');
     }
-}
+};

+ 646 - 0
phpstan-baseline.neon

@@ -0,0 +1,646 @@
+parameters:
+	ignoreErrors:
+		-
+			message: "#^Parameter \\#1 \\$appId of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/AuditComment.php
+
+		-
+			message: "#^Parameter \\#1 \\$text of method AipImageCensor\\:\\:textCensorUserDefined\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/AuditComment.php
+
+		-
+			message: "#^Parameter \\#2 \\$apiKey of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/AuditComment.php
+
+		-
+			message: "#^Parameter \\#3 \\$secretKey of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/AuditComment.php
+
+		-
+			message: "#^Parameter \\#1 \\$callback of method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),Symfony\\\\Component\\\\Finder\\\\SplFileInfo\\>\\:\\:each\\(\\) expects callable\\(Symfony\\\\Component\\\\Finder\\\\SplFileInfo, \\(int\\|string\\)\\)\\: mixed, Closure\\(string\\)\\: void given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/Update.php
+
+		-
+			message: "#^Parameter \\#1 \\$callback of method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),Symfony\\\\Component\\\\Finder\\\\SplFileInfo\\>\\:\\:transform\\(\\) expects callable\\(Symfony\\\\Component\\\\Finder\\\\SplFileInfo, \\(int\\|string\\)\\)\\: Symfony\\\\Component\\\\Finder\\\\SplFileInfo, Closure\\(mixed\\)\\: string given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/Update.php
+
+		-
+			message: "#^Parameter \\#1 \\$version1 of static method Composer\\\\Semver\\\\Comparator\\:\\:greaterThan\\(\\) expects string, Symfony\\\\Component\\\\Finder\\\\SplFileInfo given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/Update.php
+
+		-
+			message: "#^Parameter \\#2 \\$version2 of static method Composer\\\\Semver\\\\Comparator\\:\\:greaterThan\\(\\) expects string, Symfony\\\\Component\\\\Finder\\\\SplFileInfo given\\.$#"
+			count: 1
+			path: app/Console/Commands/Bjyblog/Update.php
+
+		-
+			message: "#^Call to an undefined method Illuminate\\\\Filesystem\\\\FilesystemAdapter\\:\\:getTimestamp\\(\\)\\.$#"
+			count: 2
+			path: app/Console/Commands/File/SyncToOss.php
+
+		-
+			message: "#^Parameter \\#2 \\$contents of method Illuminate\\\\Filesystem\\\\FilesystemAdapter\\:\\:put\\(\\) expects Illuminate\\\\Http\\\\File\\|Illuminate\\\\Http\\\\UploadedFile\\|Psr\\\\Http\\\\Message\\\\StreamInterface\\|resource\\|string, string\\|null given\\.$#"
+			count: 1
+			path: app/Console/Commands/File/SyncToOss.php
+
+		-
+			message: "#^Cannot access property \\$access_token on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$addtime on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$aid on mixed\\.$#"
+			count: 4
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$author on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$chid on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$cid on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$click on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$cmtid on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$cname on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$content on mixed\\.$#"
+			count: 3
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$create_time on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$date on mixed\\.$#"
+			count: 4
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$description on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$email on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$head_img on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$id on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$is_admin on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$is_show on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$is_top on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$keywords on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$last_login_ip on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$lid on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$lname on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$login_times on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$name on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$nickname on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$openid on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$ouid on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$pid on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$sort on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$status on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$tid on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$title on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$tname on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$type on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$url on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot access property \\$value on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Migration/FromThinkPHPBjyBlog.php
+
+		-
+			message: "#^Cannot use array destructuring on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Parameter \\#1 \\$secretId of class TencentCloud\\\\Common\\\\Credential constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Parameter \\#1 \\$value of function collect expects Illuminate\\\\Contracts\\\\Support\\\\Arrayable\\<\\(int\\|string\\), mixed\\>\\|iterable\\<\\(int\\|string\\), mixed\\>\\|null, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Parameter \\#2 \\$region of class TencentCloud\\\\Cvm\\\\V20170312\\\\CvmClient constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Parameter \\#2 \\$secretKey of class TencentCloud\\\\Common\\\\Credential constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Property TencentCloud\\\\Cvm\\\\V20170312\\\\Models\\\\ResetInstanceRequest\\:\\:\\$HostName \\(string\\) does not accept mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Property TencentCloud\\\\Cvm\\\\V20170312\\\\Models\\\\ResetInstanceRequest\\:\\:\\$ImageId \\(string\\) does not accept mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Property TencentCloud\\\\Cvm\\\\V20170312\\\\Models\\\\ResetInstanceRequest\\:\\:\\$InstanceId \\(string\\) does not accept mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Unable to resolve the template type TKey in call to function collect$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Unable to resolve the template type TValue in call to function collect$#"
+			count: 1
+			path: app/Console/Commands/TencentCloud/Reset.php
+
+		-
+			message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/RemoveUnused.php
+
+		-
+			message: "#^Cannot access offset mixed on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/RemoveUnused.php
+
+		-
+			message: "#^Parameter \\#1 \\$array of function ksort expects array, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/RemoveUnused.php
+
+		-
+			message: "#^Part \\$key \\(mixed\\) of encapsed string cannot be cast to string\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/RemoveUnused.php
+
+		-
+			message: "#^Cannot access offset string on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/Sync.php
+
+		-
+			message: "#^Cannot call method toEnglish\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/Sync.php
+
+		-
+			message: "#^Parameter \\#1 \\$array of function array_keys expects array, mixed given\\.$#"
+			count: 2
+			path: app/Console/Commands/Translation/Sync.php
+
+		-
+			message: "#^Parameter \\#1 \\$array of function ksort expects array, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Translation/Sync.php
+
+		-
+			message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V11_0_0.php
+
+		-
+			message: "#^Parameter \\#1 \\$values of static method Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<App\\\\Models\\\\Friend\\>\\:\\:insertOrIgnore\\(\\) expects array, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V16_0_0.php
+
+		-
+			message: "#^Cannot access property \\$id on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V5_8_4_0.php
+
+		-
+			message: "#^Cannot access property \\$title on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V5_8_4_0.php
+
+		-
+			message: "#^Cannot access property \\$id on mixed\\.$#"
+			count: 2
+			path: app/Console/Commands/Upgrade/V6_14_0.php
+
+		-
+			message: "#^Cannot access offset 'children' on mixed\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V9_0_0.php
+
+		-
+			message: "#^Method App\\\\Console\\\\Commands\\\\Upgrade\\\\V9_0_0\\:\\:getCommentsByArticleId\\(\\) should return array\\<int, array\\<string, mixed\\>\\> but returns array\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V9_0_0.php
+
+		-
+			message: "#^Parameter \\#1 \\$article_id of method App\\\\Console\\\\Commands\\\\Upgrade\\\\V9_0_0\\:\\:getCommentsByArticleId\\(\\) expects int, mixed given\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V9_0_0.php
+
+		-
+			message: "#^Parameter \\#1 \\$comment of method App\\\\Console\\\\Commands\\\\Upgrade\\\\V9_0_0\\:\\:getTree\\(\\) expects array\\<string, mixed\\>, mixed given\\.$#"
+			count: 2
+			path: app/Console/Commands/Upgrade/V9_0_0.php
+
+		-
+			message: "#^Property App\\\\Console\\\\Commands\\\\Upgrade\\\\V9_0_0\\:\\:\\$children \\(array\\<int, array\\<string, mixed\\>\\>\\) does not accept array\\<int, mixed\\>\\.$#"
+			count: 1
+			path: app/Console/Commands/Upgrade/V9_0_0.php
+
+		-
+			message: "#^Cannot call method revoke\\(\\) on Laravel\\\\Passport\\\\Token\\|null\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/PassportController.php
+
+		-
+			message: "#^Cannot call method token\\(\\) on App\\\\Models\\\\User\\|null\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/PassportController.php
+
+		-
+			message: "#^Cannot call method redirect\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Cannot call method user\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Method App\\\\Http\\\\Controllers\\\\Auth\\\\SocialiteController\\:\\:handleProviderCallback\\(\\) should return Illuminate\\\\Http\\\\RedirectResponse but returns Illuminate\\\\Http\\\\RedirectResponse\\|Illuminate\\\\Routing\\\\Redirector\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Support\\\\Collection\\<int,mixed\\>\\:\\:get\\(\\) expects int, string given\\.$#"
+			count: 2
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Parameter \\#1 \\$to of function redirect expects string\\|null, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Property App\\\\Http\\\\Controllers\\\\Auth\\\\SocialiteController\\:\\:\\$socialiteClients with generic class Illuminate\\\\Database\\\\Eloquent\\\\Collection does not specify its types\\: TKey, TModel$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Property Laravel\\\\Socialite\\\\AbstractUser\\:\\:\\$nickname \\(string\\) on left side of \\?\\? is not nullable\\.$#"
+			count: 1
+			path: app/Http/Controllers/Auth/SocialiteController.php
+
+		-
+			message: "#^Cannot call method withDepth\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/ArticleController.php
+
+		-
+			message: "#^Cannot cast mixed to int\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/CommentController.php
+
+		-
+			message: "#^Parameter \\#1 \\$title of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Parameter \\#4 \\$view of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Parameter \\#5 \\$description of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Parameter \\#6 \\$language of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Parameter \\#7 \\$image of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Parameter \\#8 \\$format of class Spatie\\\\Feed\\\\Feed constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Home/FeedController.php
+
+		-
+			message: "#^Cannot cast object\\|string\\|null to int\\.$#"
+			count: 1
+			path: app/Http/Controllers/Resources/ArticleController.php
+
+		-
+			message: "#^Parameter \\#2 \\$tag_ids of method App\\\\Models\\\\ArticleTag\\:\\:addTagIds\\(\\) expects array\\<int, int\\>, mixed given\\.$#"
+			count: 2
+			path: app/Http/Controllers/Resources/ArticleController.php
+
+		-
+			message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
+			count: 1
+			path: app/Http/Controllers/Resources/ArticleImageController.php
+
+		-
+			message: "#^Parameter \\#2 \\$options of method Illuminate\\\\Http\\\\UploadedFile\\:\\:store\\(\\) expects array\\|string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Resources/ArticleImageController.php
+
+		-
+			message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
+			count: 1
+			path: app/Http/Controllers/Resources/ConfigController.php
+
+		-
+			message: "#^Parameter \\#2 \\$options of method Illuminate\\\\Http\\\\UploadedFile\\:\\:store\\(\\) expects array\\|string, mixed given\\.$#"
+			count: 1
+			path: app/Http/Controllers/Resources/ConfigController.php
+
+		-
+			message: "#^Parameter \\#2 \\$haystack of function in_array expects array, mixed given\\.$#"
+			count: 2
+			path: app/Http/Requests/Config/Update.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Article\\:\\:articleHistories\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany does not specify its types\\: TRelatedModel$#"
+			count: 1
+			path: app/Models/Article.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Article\\:\\:category\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/Article.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Article\\:\\:getFeedItems\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Collection does not specify its types\\: TKey, TModel$#"
+			count: 1
+			path: app/Models/Article.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Article\\:\\:getIdsGivenSearchWord\\(\\) should return array\\<int, int\\> but returns array\\.$#"
+			count: 2
+			path: app/Models/Article.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Article\\:\\:tags\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany does not specify its types\\: TRelatedModel$#"
+			count: 1
+			path: app/Models/Article.php
+
+		-
+			message: "#^Method App\\\\Models\\\\ArticleHistory\\:\\:article\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/ArticleHistory.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Category\\:\\:articles\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany does not specify its types\\: TRelatedModel$#"
+			count: 1
+			path: app/Models/Category.php
+
+		-
+			message: "#^Cannot call method whereHas\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Models/Comment.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Comment\\:\\:article\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/Comment.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Comment\\:\\:parentComment\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/Comment.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Comment\\:\\:socialiteUser\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/Comment.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Config\\:\\:getValueAttribute\\(\\) should return array\\|string but returns mixed\\.$#"
+			count: 1
+			path: app/Models/Config.php
+
+		-
+			message: "#^Parameter \\#2 \\$text of function watermark expects string, mixed given\\.$#"
+			count: 1
+			path: app/Models/Observers/ArticleObserver.php
+
+		-
+			message: "#^Parameter \\#1 \\$appId of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Models/Observers/CommentObserver.php
+
+		-
+			message: "#^Parameter \\#2 \\$apiKey of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Models/Observers/CommentObserver.php
+
+		-
+			message: "#^Parameter \\#3 \\$secretKey of class AipContentCensor constructor expects string, mixed given\\.$#"
+			count: 1
+			path: app/Models/Observers/CommentObserver.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Site\\:\\:socialiteUser\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/Site.php
+
+		-
+			message: "#^Method App\\\\Models\\\\SocialiteUser\\:\\:socialiteClient\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo does not specify its types\\: TRelatedModel, TChildModel$#"
+			count: 1
+			path: app/Models/SocialiteUser.php
+
+		-
+			message: "#^Method App\\\\Models\\\\Tag\\:\\:articles\\(\\) return type with generic class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany does not specify its types\\: TRelatedModel$#"
+			count: 1
+			path: app/Models/Tag.php
+
+		-
+			message: "#^Parameter \\#1 \\$locale of method Illuminate\\\\Contracts\\\\Foundation\\\\Application\\:\\:setLocale\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: app/Providers/AppServiceProvider.php
+
+		-
+			message: "#^Parameter \\#1 \\$locale of static method Carbon\\\\Carbon\\:\\:setLocale\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: app/Providers/AppServiceProvider.php
+
+		-
+			message: "#^Parameter \\#1 \\$array of function array_filter expects array, mixed given\\.$#"
+			count: 1
+			path: app/Providers/ComposerServiceProvider.php
+
+		-
+			message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Cache\\\\RateLimiting\\\\Limit\\:\\:by\\(\\) expects string, int\\<min, \\-1\\>\\|int\\<1, max\\>\\|string\\|null given\\.$#"
+			count: 1
+			path: app/Providers/RouteServiceProvider.php
+
+		-
+			message: "#^Parameter \\#1 \\$content of static method App\\\\Models\\\\Comment\\:\\:imageToUbb\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: app/Rules/Comment.php
+
+		-
+			message: "#^Cannot call method toEnglish\\(\\) on mixed\\.$#"
+			count: 1
+			path: app/Support/helpers.php
+
+		-
+			message: "#^Parameter \\#1 \\$root of static method Illuminate\\\\Routing\\\\UrlGenerator\\:\\:assetFrom\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: app/Support/helpers.php
+
+		-
+			message: "#^Parameter \\#2 \\$haystack of function in_array expects array, mixed given\\.$#"
+			count: 1
+			path: app/Support/helpers.php
+
+		-
+			message: "#^Parameter \\#1 \\$title of static method Illuminate\\\\Support\\\\Str\\:\\:slug\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: config/cache.php
+
+		-
+			message: "#^Parameter \\#1 \\$title of static method Illuminate\\\\Support\\\\Str\\:\\:slug\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: config/database.php
+
+		-
+			message: "#^Parameter \\#1 \\$title of static method Illuminate\\\\Support\\\\Str\\:\\:slug\\(\\) expects string, mixed given\\.$#"
+			count: 1
+			path: config/session.php

+ 1 - 0
phpstan.neon

@@ -1,5 +1,6 @@
 includes:
     - ./vendor/nunomaduro/larastan/extension.neon
+    - phpstan-baseline.neon
 parameters:
     level: max
     paths:

+ 10 - 8
phpunit.xml

@@ -26,13 +26,15 @@
         </include>
     </coverage>
     <php>
-        <server name="APP_ENV" value="testing"/>
-        <server name="BCRYPT_ROUNDS" value="4"/>
-        <server name="CACHE_DRIVER" value="array"/>
-        <server name="MAIL_MAILER" value="array"/>
-        <server name="QUEUE_CONNECTION" value="sync"/>
-        <server name="SESSION_DRIVER" value="array"/>
-        <server name="TELESCOPE_ENABLED" value="false"/>
-        <server name="SCOUT_DRIVER" value="null"/>
+        <env name="APP_ENV" value="testing"/>
+        <env name="BCRYPT_ROUNDS" value="4"/>
+        <env name="CACHE_DRIVER" value="array"/>
+        <!-- <env name="DB_CONNECTION" value="sqlite"/> -->
+        <!-- <env name="DB_DATABASE" value=":memory:"/> -->
+        <env name="MAIL_MAILER" value="array"/>
+        <env name="QUEUE_CONNECTION" value="sync"/>
+        <env name="SESSION_DRIVER" value="array"/>
+        <env name="TELESCOPE_ENABLED" value="false"/>
+        <env name="SCOUT_DRIVER" value="null"/>
     </php>
 </phpunit>

+ 7 - 7
public/index.php

@@ -7,17 +7,17 @@ define('LARAVEL_START', microtime(true));
 
 /*
 |--------------------------------------------------------------------------
-| Check If Application Is Under Maintenance
+| Check If The Application Is Under Maintenance
 |--------------------------------------------------------------------------
 |
-| If the application is maintenance / demo mode via the "down" command we
-| will require this file so that any prerendered template can be shown
+| If the application is in maintenance / demo mode via the "down" command
+| we will load this file so that any pre-rendered content can be shown
 | instead of starting the framework, which could cause an exception.
 |
 */
 
-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;
 }
 
 /*
@@ -48,8 +48,8 @@ $app = require_once __DIR__.'/../bootstrap/app.php';
 
 $kernel = $app->make(Kernel::class);
 
-$response = tap($kernel->handle(
+$response = $kernel->handle(
     $request = Request::capture()
-))->send();
+)->send();
 
 $kernel->terminate($request, $response);

+ 4 - 2
resources/js/bootstrap.js

@@ -43,11 +43,13 @@ if (token) {
  * allows your team to easily build robust real-time web applications.
  */
 
-// import Echo from 'laravel-echo'
+// import Echo from 'laravel-echo';
 
 // window.Pusher = require('pusher-js');
 
 // window.Echo = new Echo({
 //     broadcaster: 'pusher',
-//     key: 'your-pusher-key'
+//     key: process.env.MIX_PUSHER_APP_KEY,
+//     cluster: process.env.MIX_PUSHER_APP_CLUSTER,
+//     forceTLS: true
 // });

+ 3 - 1
tests/Feature/Resources/CategoryControllerTest.php

@@ -25,7 +25,9 @@ class CategoryControllerTest extends TestCase
         'pid'         => 1,
     ];
     protected $updateData = [
-        'name' => 'Updated Name',
+        'name'        => 'Updated name',
+        'keywords'    => 'Updated keywords',
+        'description' => 'Updated description',
     ];
 
     public function testDestroy()

+ 2 - 2
tests/_baseline/Feature/Auth/ApiControllerTest__testLoginInvalidPassword__1.json

@@ -9,10 +9,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ]
     },
     "content": {

+ 2 - 2
tests/_baseline/Feature/Auth/ApiControllerTest__testLogin__1.json

@@ -12,10 +12,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ]
     },
     "content": {

+ 2 - 2
tests/_baseline/Feature/DashboardControllerTest__testAnalysis__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testStore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testUpdateClearDescription__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ArticleControllerTest__testUpdate__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testStoreWithUnknownKey__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CategoryControllerTest__testStore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 14 - 11
tests/_baseline/Feature/Resources/CategoryControllerTest__testUpdate__1.json

@@ -1,5 +1,5 @@
 {
-    "status_code": 422,
+    "status_code": 200,
     "headers": {
         "cache-control": [
             "no-cache, private"
@@ -9,24 +9,27 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
-        "errors": {
-            "keywords": [
-                "关键词 不能为空。"
-            ],
-            "description": [
-                "描述 不能为空。"
-            ]
+        "data": {
+            "id": 1,
+            "name": "Updated name",
+            "slug": "php",
+            "keywords": "Updated keywords",
+            "description": "Updated description",
+            "sort": 1,
+            "pid": 0,
+            "created_at": "2017-07-16 07:35:12",
+            "updated_at": "2019-01-01 00:00:00",
+            "deleted_at": null
         }
     }
 }

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/CommentControllerTest__testUpdate__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ConfigControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ConfigControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/ConfigControllerTest__testUpdate__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 3 - 3
tests/_baseline/Feature/Resources/FriendControllerTest__testStoreValidation__1.json

@@ -9,17 +9,17 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
+        "message": "名称 不能为空。 (and 1 more error)",
         "errors": {
             "name": [
                 "名称 不能为空。"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testStore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 3 - 3
tests/_baseline/Feature/Resources/FriendControllerTest__testUpdateValidation__1.json

@@ -9,17 +9,17 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
+        "message": "名称 不能为空。 (and 1 more error)",
         "errors": {
             "name": [
                 "名称 不能为空。"

+ 2 - 2
tests/_baseline/Feature/Resources/FriendControllerTest__testUpdate__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 3 - 3
tests/_baseline/Feature/Resources/NavControllerTest__testStoreValidation__1.json

@@ -9,17 +9,17 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
+        "message": "名称 不能为空。 (and 1 more error)",
         "errors": {
             "name": [
                 "名称 不能为空。"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testStore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 3 - 3
tests/_baseline/Feature/Resources/NavControllerTest__testUpdateValidation__1.json

@@ -9,17 +9,17 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
+        "message": "名称 不能为空。 (and 1 more error)",
         "errors": {
             "name": [
                 "名称 不能为空。"

+ 2 - 2
tests/_baseline/Feature/Resources/NavControllerTest__testUpdate__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NoteControllerTest__testDestroy__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NoteControllerTest__testForceDelete__1.json

@@ -6,10 +6,10 @@
         ],
         "date": "Tue, 01 Jan 2019 00:00:00 CST",
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NoteControllerTest__testIndex__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NoteControllerTest__testRestore__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 2 - 2
tests/_baseline/Feature/Resources/NoteControllerTest__testShow__1.json

@@ -9,10 +9,10 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"

+ 3 - 3
tests/_baseline/Feature/Resources/NoteControllerTest__testStoreValidation__1.json

@@ -9,17 +9,17 @@
             "application\/json"
         ],
         "x-ratelimit-limit": [
-            60
+            "60"
         ],
         "x-ratelimit-remaining": [
-            59
+            "59"
         ],
         "access-control-allow-origin": [
             "http:\/\/laravel-bjyblog.test"
         ]
     },
     "content": {
-        "message": "The given data was invalid.",
+        "message": "内容 不能为空。",
         "errors": {
             "content": [
                 "内容 不能为空。"

+ 0 - 0
tests/_baseline/Feature/Resources/NoteControllerTest__testStore__1.json


部分文件因文件數量過多而無法顯示