本文整理汇总了PHP中app\Client::paginate方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::paginate方法的具体用法?PHP Client::paginate怎么用?PHP Client::paginate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Client
的用法示例。
在下文中一共展示了Client::paginate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ver
public function ver($id)
{
$clientes_actuales = Client::paginate(5);
$clientes = Client::findOrFail($id);
$user = User::all()->lists('username', 'id');
$selected = array();
return view('clientes.ver', compact('clientes', 'user', 'selected', 'clientes_actuales'));
}
示例2: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
if (Auth::user()['role'] == 'Sales') {
$clients = Client::where('user_id', Auth::user()['id'])->paginate(10);
} else {
// $clients = Client::all();
$clients = Client::paginate(10);
//$clients->setpath('hsms/public/clients/');
}
return view('clients.index', compact('clients'));
}
示例3: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$title = 'CLIENT';
if (Input::has('cid')) {
$id = Input::get('cid');
$clients = Client::where('cid', $id)->paginate(10);
} elseif (Input::has('name')) {
$name = Input::get('name');
$clients = Client::where('name', 'like', '%' . $name . '%')->paginate(10);
} elseif (Input::has('contact_person')) {
$contact_person = Input::get('contact_person');
$clients = Client::where('contact_person', 'like', '%' . $contact_person . '%')->paginate(10);
} elseif (Input::has('city')) {
$city = Input::get('city');
$clients = Client::where('city', 'like', '%' . $city . '%')->paginate(10);
} elseif (Input::has('state')) {
$state = Input::get('state');
$clients = Client::where('state', 'like', '%' . $state . '%')->paginate(10);
} else {
$clients = Client::paginate(10);
}
$repository = $this->repository;
return view('client/index', compact('title', 'clients', 'repository'));
}
示例4: index
/**
* Display a listing of clients.
*
* @return Response
*/
public function index()
{
$clients = Client::paginate(12);
return view('admin.index_clients')->with('title', 'View Clients')->with('clients', $clients);
}
示例5: index
/**
* Show the application dashboard.
* GET: /client.
*
* @return Response
*/
public function index()
{
$clients = Client::paginate(2);
return view('clients.index')->with('clients', $clients);
}
示例6: index
/**
* Display a listing of the resource.
* @return \Illuminate\Http\Response
*/
public function index()
{
$clients = Client::paginate(10);
return view('clients.index', compact('clients', $clients));
}