laravel 6.x 全文搜索Scout生成宏命令出错 
                            
                                                    
                        
                    
                    
  
                    
                    根据文档配置count宏命令
出现以下错误

以下是我的代码
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Laravel\Scout\Builder;
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Builder::macro('count', function () {
            return $this->engine->getTotalCount(
                $this->engine()->search($this)
            );
        });
    }
}
请问这种怎么解决呀?
          
                    
                    
          
          
                关于 LearnKu
              
                    
                    
                    
 
推荐文章: