0
我想用弹性search.I安装弹性搜索2.3.2。而添加此软件包需要composer.json特质“应用/ Elasticquent特质”未找到laravel5.2和elasticsearch-2.3.2
"fairholm/elasticquent": "1.0.*",
这我的产品型号
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Elasticquent\ElasticquentTrait;
class Product extends BaseModel
{
use ElasticquentTrait;
protected $primaryKey = 'id';
protected $table = 'products';
protected $fillable =array('name','id','title','description','image','price','category_id','brand_id','created_at_ip','updated_at_ip');
protected $mappingProperties = array(
'name' => [
'type' => 'string',
"analyzer" => "standard",
],
'title' => [
'type' => 'string',
"analyzer" => "standard",
],
'description' => [
'type' => 'string',
"analyzer" => "stop",
"stopwords" => [","]
],
);
}
我得到两个错误
Undefined namespace Elasticquent
Undefined class ElasticquentTrait
如何解决呢? 请任何一个帮助我
我已经添加使用Elasticquent \ ElasticquentTrait;但获取错误未定义的命名空间Elasticquent如何解决它? –