/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $items = $this->repository->findAll();
     $paginate = new \Illuminate\Pagination\LengthAwarePaginator($items, $this->repository->countAll(), 10);
     $paginate->setPath(route($this->baseRoute . 'index'));
     return view($this->baseView . 'index', compact('items', 'paginate'));
 }
 public function listLogs()
 {
     $stats = $this->logViewer->statsTable();
     $headers = $stats->header();
     // $footer   = $stats->footer();
     $page = request()->input('page', 1);
     $offset = $page * $this->perPage - $this->perPage;
     $rows = new \Illuminate\Pagination\LengthAwarePaginator(array_slice($stats->rows(), $offset, $this->perPage, true), count($stats->rows()), $this->perPage, $page);
     $rows->setPath(request()->url());
     return $this->view('logs', compact('headers', 'rows', 'footer'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $collection = $this->repository->findAll();
     $items = array();
     foreach ($collection as $item) {
         $items[] = $this->builder->build($item);
     }
     $paginate = new \Illuminate\Pagination\LengthAwarePaginator($items, $this->repository->countAll(), 10);
     $paginate->setPath(route($this->base . 'index'));
     return view($this->base . 'index', compact('items', 'paginate'));
 }
Example #4
0
 function pagination($collection, $perPage = 15, $path = '/', $template = null)
 {
     $page = request()->query->get('page', 1);
     $paginate = new Illuminate\Pagination\LengthAwarePaginator($collection->forPage($page, $perPage), $collection->count(), $perPage, $page, ['path' => site_url($path)]);
     if ($template == null) {
         $template = 'bootstrap_md';
     }
     $paginate->presenter(function () use($paginate, $template) {
         return new Library\Pagination\BootstrapCustomPresenter($paginate, $template);
     });
     return $paginate;
 }
Example #5
0
 /**
  * Get HTML wrapper for a page link.
  *
  * @param  string  $url
  * @param  int  $page
  * @param  string|null  $rel
  * @return string
  */
 protected function getPageLinkWrapper($url, $page, $rel = null)
 {
     if ($page == $this->paginator->currentPage()) {
         return $this->getActivePageWrapper($page);
     }
     return $this->getAvailablePageWrapper($url, $page, $rel);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request, $id = null)
 {
     $projects = $this->employee->listProjectUserBelong();
     if ($id == null) {
         $id = Project::pluck('id');
     }
     $detailfeatures = array();
     $features = Project::find($id)->features()->get();
     $detailfeatures = new Collection();
     foreach ($features as $key_fea => $value_fea) {
         $detaiFeas = $value_fea->detailfeatures()->get();
         foreach ($detaiFeas as $key => $value) {
             $detailfeatures->add($value);
         }
     }
     $page = Input::get('page') == NULL ? 1 : Input::get('page');
     $path = $request->url;
     $count = $detailfeatures->count();
     $pagiDetailfeatures = new \Illuminate\Pagination\LengthAwarePaginator($detailfeatures, $count, 5, $page);
     $pagiDetailfeatures->setPath($path);
     $detailfeatures = $detailfeatures->slice($pagiDetailfeatures->firstItem() - 1, 5);
     return view('manageproject.manageproject', compact('projects', 'detailfeatures', 'pagiDetailfeatures'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $items = $this->repository->findAll();
     $paginate = new \Illuminate\Pagination\LengthAwarePaginator($items, $this->repository->countAll(), 10);
     $paginate->setPath(route($this->baseRoute . 'index'));
     \View::share('createProductUrl', route($this->baseRoute . 'create', array('store_id' => $this->store->id->value())));
     return view($this->baseView . 'index', compact('items', 'paginate'));
 }
Example #8
0
        $response = processImageList();
        if (isset($response) && $response['success'] && is_numeric($response['id']) && $response['id'] > 0) {
            $classify_many_id = $response["id"];
        }
    } else {
        if (isset($_GET['classify_many']) && is_numeric($_GET['classify_many'])) {
            $classify_many_id = $_GET['classify_many'];
        }
    }
}
if (isset($classify_many_id) && is_numeric($classify_many_id)) {
    $classify_many_predictions = ClassifyManySample::where('classify_many_id', '=', $classify_many_id)->with('_class')->get()->toArray();
    $current_page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
    $items_per_page = 15;
    $current_items = array_slice($classify_many_predictions, $items_per_page * ($current_page - 1), $items_per_page);
    $paginator = new Illuminate\Pagination\LengthAwarePaginator($current_items, count($classify_many_predictions), $items_per_page, $current_page);
    $paginator->setPath('classifier.php');
    $paginator->appends(['classify_many' => $classify_many_id]);
    $presenter = new Landish\Pagination\Materialize($paginator);
}
$title = "Classifier";
include_once "include/header.inc.php";
?>

<div class="section">
    <div class="row">
        <div class="col s12">
            <ul class="tabs tabs-fixed-width">
                <li class="tab"><a class="<?php 
echo isset($classify_many_id) ? '' : 'active';
?>