lundi 27 août 2018

Algolia Undefined property: Illuminate\Database\Eloquent\Collection::$filter

I'm creating a crud app with a search function using algolia. The crud functionality is perfect; however, when I try to index the current database with algolia it throws Undefined property: Illuminate\Database\Eloquent\Collection::$filter. This is the posts model using the search functionality.

 <?php

 namespace App;

 use Laravel\Scout\Searchable;
 use Illuminate\Database\Eloquent\Model;


class Post extends Model
{
use Searchable;

protected $primaryKey = 'id';
protected $fillable = [
    'title', 'content', 'author_id'
];

// Make relationship to Users table
public function users ()
{
    return $this->belongsTo('App\User', 'author_id');
}
}

Any suggestions would be greatly welcomed. I'm using laravel 5.6, and scout.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2wgzmd0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire