本文整理汇总了PHP中UserService::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserService::getUsers方法的具体用法?PHP UserService::getUsers怎么用?PHP UserService::getUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserService
的用法示例。
在下文中一共展示了UserService::getUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showUsers
/**
* Show all users.
*
* @return mixed The response.
*/
public function showUsers()
{
try {
$users = UserService::getUsers();
$data = array('users' => $users);
return View::make('users.list', $data);
} catch (Exception $e) {
return $this->unexpected($e);
}
}
示例2: UserService
<?php
$userService = new UserService();
//get selected user
$selectedUserId = $userService->getSelectedUser();
//get users list
$users = $userService->getUsers();
$config = Config::get();
?>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand">Paypal Sample</a>
</div>
<div class="navbar-collapse collapse" id="navbar">
<!-- menu -->
<ul class="nav navbar-nav">
<?php
foreach ($config['menu'] as $item) {
$active = $item['page'] == $page ? 'class="active"' : '';
?>
<li <?php
echo $active;
?>