本文整理匯總了PHP中app\User::name方法的典型用法代碼示例。如果您正苦於以下問題:PHP User::name方法的具體用法?PHP User::name怎麽用?PHP User::name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\User
的用法示例。
在下文中一共展示了User::name方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: filterAndPaginate
public static function filterAndPaginate($name, $type)
{
return User::name($name)->type($type)->orderBy('id', 'DESC')->paginate();
}
示例2: compose
public function compose($view)
{
$view->users = User::name(Input::get('name'))->paginate(5);
}
示例3: index
/**
* Display a listing of the resource.
*
* @param Request $request
* @return Response
*/
public function index(Request $request)
{
$users = User::name($request->get('name'))->role($request->get('role'))->orderBy('created_at', 'DESC')->paginate();
return view('admin.users.index')->with('users', $users)->with('title', trans('titles.list_users'));
}
示例4: userSearch
public function userSearch()
{
$q = Input::get('user');
$users = User::name($q)->get();
return view('profile.searchUser', compact('users'));
}
示例5: buscarUser
public function buscarUser(Request $request)
{
$users = User::name($request->get('name'))->get();
return $users;
}
示例6: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$users = User::name($request->name)->orderBy('id', 'ASC')->paginate(10);
//$users = User::paginate(10);
return view('admin.users.index', compact('users'));
}
示例7: filter
public static function filter($name, $role, $cedula)
{
return User::name($name)->role($role)->cedula($cedula)->orderBy('created_at', 'DESC')->paginate(3);
}
示例8: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index(Request $request)
{
$users = User::name($request->get('name'))->paginate();
return view('admin.users.index', compact('users'));
}
示例9: filterAndPaginate
public static function filterAndPaginate($name)
{
return User::name($name)->orderBy('name', 'ASC')->paginate();
}