laravel - ’Call to a member function make() on null‘ When installing Eloquence -


i'm trying install eloquence on laravel project.

eloquence installation

i'm following installation, , i've done following:

  1. require package in composer.json
  2. add eloquence trait model
  3. add sofa\eloquence\serviceprovider config/app.php providers array

problem: post::search('jarek sofa')->get(); results in

fatalthrowableerror in builder.php line 77: call member function make() on null 

here code

possible reasons:

  1. the eloquence service provider wasn't registered properly
  2. maybe composer

thanks in advance

finally got work!

solution: add \sofa\eloquence\builder::setparserfactory(new \sofa\eloquence\searchable\parserfactory);

in appserviceprovider boot method this:

<?php  namespace app\providers;  use illuminate\support\serviceprovider;  class appserviceprovider extends serviceprovider {     /**      * bootstrap application services.      *      * @return void      */     public function boot()     {         \sofa\eloquence\builder::setparserfactory(new \sofa\eloquence\searchable\parserfactory);     }      /**      * register application services.      *      * @return void      */     public function register()     {         //     } } 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -