Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Commit

Permalink
Merge pull request #64 from GrahamCampbell/fixes
Browse files Browse the repository at this point in the history
Support all (current) laravel versions
  • Loading branch information
mikemand committed Jun 4, 2014
2 parents 3ce8e8c + 8b7746b commit 15ecb82
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use Carbon\Carbon;
use Kmd\Logviewer\Logviewer;
use Illuminate\Pagination\Environment;

$filters = Config::get('logviewer::filters.global');

Expand Down Expand Up @@ -111,7 +110,15 @@

$levels = $logviewer->getLevels();

$paginator = new Environment(App::make('request'), App::make('view'), App::make('translator'));
if (class_exists('Illuminate\Pagination\Factory')) {
$class = 'Illuminate\Pagination\Factory';
} elseif (class_exists('Illuminate\Pagination\Environment')) {
$class = 'Illuminate\Pagination\Environment';
} else {
throw new \Exception('A pagination class was not available.');
}

$paginator = new $class(App::make('request'), App::make('view'), App::make('translator'));

$view = Config::get('logviewer::p_view');

Expand Down

0 comments on commit 15ecb82

Please sign in to comment.