|
@@ -410,7 +410,7 @@ class MyController extends Controller
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @api {get} /api/dream/search_collection 梦想搜索
|
|
|
|
|
|
+ * @api {get} /api/my/search_collection 梦想搜索
|
|
* @apiDescription 梦想搜索
|
|
* @apiDescription 梦想搜索
|
|
* @apiGroup My
|
|
* @apiGroup My
|
|
* @apiPermission none
|
|
* @apiPermission none
|
|
@@ -456,6 +456,11 @@ class MyController extends Controller
|
|
$data = DreamInfoModel::where('name','like',$keyword)->
|
|
$data = DreamInfoModel::where('name','like',$keyword)->
|
|
orWhere('sign','like',$keyword)->with('user','imgs')->get();
|
|
orWhere('sign','like',$keyword)->with('user','imgs')->get();
|
|
$this->insertSearchTable($user->id,$request->keyword);
|
|
$this->insertSearchTable($user->id,$request->keyword);
|
|
|
|
+ /* $data = $user->whereHas('careDreams', function ($query) use ($keyword) {
|
|
|
|
+ $query-> where('name','like',$keyword)->
|
|
|
|
+ orWhere('sign','like',$keyword)->with('user','imgs');
|
|
|
|
+ })->careDreams;
|
|
|
|
+ return $data;*/
|
|
return $this->api(compact('data'));
|
|
return $this->api(compact('data'));
|
|
}
|
|
}
|
|
|
|
|