本文整理汇总了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');
}
示例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));
}
示例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ış!'));
}
示例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: