示例#1
0
 /**
  * 换序
  * @param $query
  * @return mixed
  */
 public function scopeHx($query)
 {
     $made = new Made();
     $farb = $made->farb($this->key);
     foreach ($farb as $v) {
         $query->OrWhere('name', $v);
     }
     return $query;
 }
示例#2
0
 public function scopeBhcx($query)
 {
     $made = new Made();
     $key_array = $made->splitWord($this->key);
     $made->getSort($key_array);
     foreach ($made->getSort($key_array) as $v) {
         $query->orWhere('title', 'like', '%' . $this->key . '%');
         var_dump($made->getSort($v));
     }
     return $query;
 }