Exemplo n.º 1
0
 public function index()
 {
     $users['male'] = User::leftJoin('user_recommend', 'user_recommend.user_id', '=', 'users.user_id')->where('user_recommend.page', \App\Enum\User::RECOMMEND_HOME)->whereIn('level', array(\App\Enum\User::LEVEL_1))->male()->limit(24)->orderBy('user_recommend.order')->get();
     $users['female'] = User::leftJoin('user_recommend', 'user_recommend.user_id', '=', 'users.user_id')->where('user_recommend.page', \App\Enum\User::RECOMMEND_HOME)->female()->limit(24)->orderBy('user_recommend.order')->get();
     $users['vip'] = User::leftJoin('user_recommend', 'user_recommend.user_id', '=', 'users.user_id')->where('user_recommend.page', \App\Enum\User::RECOMMEND_HOME)->male()->level(\App\Enum\User::LEVEL_3)->limit(24)->orderBy('user_recommend.order')->get();
     //筛选出鸳鸯谱的所有案例
     $case = Scase::where('publish_type', '=', scaseEnum::PUBLISH_YUANYANGPU)->get();
     return $this->view('index')->with('users', $users)->with('case', $case);
 }
Exemplo n.º 2
0
 public function getJjlist()
 {
     $scase = Scase::where('publish_type', '=', scaseEnum::PUBLISH_MARRY)->get();
     return $this->view('jiehunlist')->with('case', $scase);
 }