Skip to content

Commit

Permalink
isLumen() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Szekeres Bálint committed Feb 20, 2018
1 parent e183ebb commit 20a3aad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions src/Corcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ class Corcel
*/
public static function isLaravel()
{
return function_exists('app') &&
app() instanceof Application;
}

/**
* @return bool
*/
public static function isLumen()
{
return preg_match('/Lumen', app()->version()) === 1;
return function_exists('app') && (
app() instanceof Application ||
strpos(app()->version(), 'Lumen') === 0
);
}
}
2 changes: 1 addition & 1 deletion src/Laravel/CorcelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function boot()
$this->registerAuthProvider();
$this->registerMorphMaps();
}

/**
* @return void
*/
Expand Down

0 comments on commit 20a3aad

Please sign in to comment.