当前位置: 首页>>代码示例>>PHP>>正文


PHP Members::get方法代码示例

本文整理汇总了PHP中Members::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Members::get方法的具体用法?PHP Members::get怎么用?PHP Members::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Members的用法示例。


在下文中一共展示了Members::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: homepage

 public function homepage()
 {
     $admin = Session::get('adminLoggedIn');
     if ($admin) {
         $members = Members::get();
         $posts = DB::table('posts')->join('members', 'members.memberID', '=', 'posts.memberID')->get();
         $data = array('members' => $members, 'posts' => $posts, 'homepage' => true);
         return View::make('admin/adminHomepage', $data);
     }
     Session::flush();
     return Redirect::to('login');
 }
开发者ID:mitap45,项目名称:Daily,代码行数:12,代码来源:AdminController.php

示例2: memberHomepage

 public function memberHomepage()
 {
     $memberID = Session::get('key');
     $members = Members::get();
     $followings = DB::table('follow')->select('followMemberID')->where('memberID', $memberID)->get();
     $posts = [];
     foreach ($followings as $f) {
         $posts = array_merge($posts, DB::table('posts')->join('members', 'members.memberID', '=', 'posts.memberID')->where('members.memberID', $f->followMemberID)->get());
     }
     //		return Hash::make('aaaaaa');
     return View::make('member/homepage', array('posts' => $posts, 'memberID' => $memberID, 'members' => $members));
 }
开发者ID:mitap45,项目名称:Daily,代码行数:12,代码来源:MemberController.php

示例3: loginControl

 public function loginControl()
 {
     $email = Input::get('email');
     $pw = Input::get('password');
     $members = Members::get();
     $admins = Admin::get();
     foreach ($admins as $admin) {
         if ($email == $admin->email && Hash::check($pw, $admin->password)) {
             Session::put('adminLoggedIn', true);
             return Redirect::to('admin');
         }
     }
     foreach ($members as $m) {
         if ($m->email == $email && Hash::check($pw, $m->password)) {
             Session::put('key', $m->memberID);
             return Redirect::to('homepage');
         }
     }
     return View::make('login', array('message' => 'Kullanıcı adı veya Şifre Yanlış!'));
 }
开发者ID:mitap45,项目名称:Daily,代码行数:20,代码来源:HomeController.php

示例4: Request

            $query = new Request();
            $name = $query->query($ident->getname($request['info']['id'])->sql);
            $response = (array) $request['info'];
            break;
        default:
            # code...
            break;
    }
    echo json_encode($response);
});
$app->post('/members', function () use($app) {
    $request = (array) json_decode($app->request->getBody());
    switch ($request['action']) {
        case 'GET':
            $action = new Members();
            $action->get((array) $request['info']);
            $insert = new Request();
            $response = $insert->query($action->sql);
            break;
        case 'REMOVE':
            break;
        case 'EDIT':
            break;
        case 'ADD':
            $action = new Members();
            $action->add((array) $request['info']);
            $insert = new Request();
            $insert->insertNR($action->sql);
            $response = $request['info'];
            break;
        default:
开发者ID:bobbyfisher928,项目名称:OneYum,代码行数:31,代码来源:index.php


注:本文中的Members::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。