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


PHP Paginator::setPageName方法代码示例

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


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

示例1: _createPaginator

 /**
  * (non-PHPdoc)
  * @see \Mawelous\Yamop\Mapper::_createPaginator()
  */
 protected function _createPaginator($results, $totalCount, $perPage, $page, $options)
 {
     if ($options) {
         \Paginator::setPageName($options);
         $paginator = \Paginator::make($results, $totalCount, $perPage);
         \Paginator::setPageName('page');
     } else {
         $paginator = \Paginator::make($results, $totalCount, $perPage);
     }
     return $paginator;
 }
开发者ID:mawelous,项目名称:yamop-laravel,代码行数:15,代码来源:Mapper.php

示例2: show

 public function show($id)
 {
     $project = Project\Project::find($id);
     $title = $project ? link_to($project->getURL(), $project->title) : NULL;
     Paginator::setPageName('tasks_page');
     $tasks = Task\Task::unClaimed()->whereHas('Project', function ($q) use($id) {
         $q->where('id', '=', $id);
     })->paginate(16);
     Paginator::setPageName('claimed_tasks_page');
     $claimed_tasks = Task\Task::claimed()->whereHas('Project', function ($q) use($id) {
         $q->where('id', '=', $id);
     })->paginate(8);
     return View::make('site.tasks.index', ['tasks' => $tasks, 'title' => $title, 'claimed_tasks' => $claimed_tasks]);
 }
开发者ID:vanderlin,项目名称:halp,代码行数:14,代码来源:ProjectsController.php

示例3: GetInvoiceList

 /**
  * User order/transaction history
  *
  * @param  array  $option
  * @return \Illuminate\Database\Eloquent\Model
  */
 public function GetInvoiceList(array $option = array())
 {
     $user = \Auth::user();
     $data = \OrderPayment::with(['Order' => function ($query) {
         $query->with('User', 'OrderSchedule', 'DeliverySchedule', 'ReturnSchedule');
     }]);
     if ($user->type == "user") {
         $data->whereHas('Order', function ($query) use($user) {
             $query->where('user_id', $user->id);
         });
     } elseif ($user->type == "driver") {
         if (!empty($option['page_name'])) {
             \Paginator::setPageName($option['page_name']);
         }
         $data->where('status', 2)->orderBy('created_at', 'desc');
     }
     return $data->paginate(20);
 }
开发者ID:rizalafani,项目名称:thankspace,代码行数:24,代码来源:OrderRepo.php

示例4: array

		@endif

	</section>

	<div class="turtle-break" id="claimed-task">
		<div class="turtle-line"></div>
		<div class="turtle-svg">
			{{print_svg('assets/img/happy-turtle.svg')}}
		</div>
		{{-- <img src="{{asset('assets/img/happy-turtle.svg')}}" width="111px" height="58px" /> --}}
		<div class="turtle-line"></div>
		<h3>Claimed Tasks{{isset($title)?' for '.$title:''}}:</h3>
	</div>

	<section class="content" id="claimed-tasks-content">
		@if ($claimed_tasks->count()>0)
			@foreach ($claimed_tasks as $task)
				@include('site.tasks.card', array('task' => $task, 'show_button'=>false))
			@endforeach
			<?php 
Paginator::setPageName('claimed_tasks_page');
?>
			{{$claimed_tasks->appends('claimed_tasks_page', Input::get('claimed_tasks_page', 1))->fragment('claimed-task')->links()}}
		@else
			<h3>No Claimed Tasks</h3>
		@endif

	</section>
@stop
  
开发者ID:vanderlin,项目名称:halp,代码行数:29,代码来源:index.blade.php

示例5: api_get_tracks

 public function api_get_tracks()
 {
     Paginator::setPageName('page');
     $tracks = Track::join('albums', 'albums.id', '=', 'tracks.album_id')->join('artists', 'artists.id', '=', 'albums.artist_id')->select(array('tracks.id', 'albums.name as album_name', 'tracks.name as track_name', 'artists.name as artist_name'));
     $search = Input::get('search');
     if (isset($search)) {
         $tracks = $tracks->where('tracks.name', 'like', '%' . $search . '%')->orWhere('albums.name', 'like', '%' . $search . '%')->orWhere('artists.name', 'like', '%' . $search . '%');
     }
     $tracks = $tracks->paginate(PAGE_SIZE);
     //var_dump(DB::getQueryLog());die();
     return $tracks;
 }
开发者ID:ariftechnologies,项目名称:musicStore,代码行数:12,代码来源:MusicStoreController.php


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