Skip to content

Commit

Permalink
Fixing break for Lumen integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil Portugues Caldero committed Jan 8, 2016
1 parent 7a78a19 commit 22ab726
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

namespace NilPortugues\Laravel5\JsonApi;

use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use NilPortugues\Laravel5\JsonApi\Providers\Laravel51Provider;
use NilPortugues\Laravel5\JsonApi\Providers\Laravel52Provider;

class Laravel5JsonApiServiceProvider extends ServiceProvider
{
const LARAVEL_APPLICATION = 'Illuminate\Foundation\Application';
const PATH = '/../../../config/jsonapi.php';

/**
Expand All @@ -42,7 +42,11 @@ public function register()
{
$this->mergeConfigFrom(__DIR__.self::PATH, 'jsonapi');

$version = Application::VERSION;
$version = '5.0.0';
if (class_exists(self::LARAVEL_APPLICATION)) {
$class = self::LARAVEL_APPLICATION;
$version = $class::VERSION;
}

switch ($version) {
case false !== strpos($version, '5.0.'):
Expand Down

0 comments on commit 22ab726

Please sign in to comment.