|
@@ -114,6 +114,7 @@ class IndexController extends Controller
|
|
public function home(Request $request)
|
|
public function home(Request $request)
|
|
{
|
|
{
|
|
$login_user = $this->getUser();
|
|
$login_user = $this->getUser();
|
|
|
|
+ $login_user = UserInfoModel::find(1);
|
|
$id = $login_user->id;
|
|
$id = $login_user->id;
|
|
$arr1 =DreamInfoModel::orderBy('score','desc')->limit(30)->select('id')->get()->toArray();
|
|
$arr1 =DreamInfoModel::orderBy('score','desc')->limit(30)->select('id')->get()->toArray();
|
|
$id_arr1 = array_column($arr1,'id');
|
|
$id_arr1 = array_column($arr1,'id');
|
|
@@ -447,9 +448,9 @@ class IndexController extends Controller
|
|
});
|
|
});
|
|
}
|
|
}
|
|
\Log::info($query->toSql());
|
|
\Log::info($query->toSql());
|
|
- $arr1 =DreamInfoModel::limit(20)->select('id')->get()->toArray();
|
|
|
|
|
|
+ $arr1 =DreamInfoModel::orderBy('id')->limit(20)->select('id')->get()->toArray();
|
|
$id_arr1 = array_column($arr1,'id');
|
|
$id_arr1 = array_column($arr1,'id');
|
|
- $arr2 =DreamInfoModel::orderBy('score','desc')->limit(120)->select('id')->get()->toArray();
|
|
|
|
|
|
+ $arr2 =DreamInfoModel::orderBy('id','desc')->limit(120)->select('id')->get()->toArray();
|
|
$id_arr2 = array_column($arr2,'id');
|
|
$id_arr2 = array_column($arr2,'id');
|
|
$dtusers =UserCareUser::where('user_id',$id)->with('other_user')->
|
|
$dtusers =UserCareUser::where('user_id',$id)->with('other_user')->
|
|
where('dream_number','>',0)->orderBy('created_at')->get()->toArray();
|
|
where('dream_number','>',0)->orderBy('created_at')->get()->toArray();
|