示例#1
0
 public function getIndex()
 {
     $users = UserRecommend::with(array('user' => function ($query) {
         //只需要正常状态的会员
         return $query->status();
     }))->index()->orderBy('order')->get();
     //派对集结号
     $assembly = Assembly::where('index_status', '=', AssemblyasEnum::DISPLAY_BLOCK)->limit(5)->orderBy('created_at', 'desc')->get();
     return $this->view('index')->with('users', $users)->with('assembly', $assembly);
 }
示例#2
0
 public function index(Assembly $assembly)
 {
     $lanmus = Assembly::where('index_status', '=', EnumAssembly::DISPLAY_BLOCK)->orderBy('created_at', 'desc')->get();
     return $this->view('index')->with('assembly', $assembly)->with('lanmus', $lanmus);
 }
示例#3
0
 /**
  * 显示文章管理首页
  * @return $this
  */
 public function index()
 {
     $models = Assembly::all(['assembly_id', 'admin_id', 'title', 'index_status', 'created_at']);
     $models->load(['admin']);
     return $this->view('index')->with('models', $models);
 }