Skip to content

Commit

Permalink
Set Str alias for Lumen
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Oct 12, 2020
1 parent 472b042 commit 2b523a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ScribeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ public function boot()

// Bind the route matcher implementation
$this->app->bind(RouteMatcherInterface::class, config('scribe.routeMatcher', RouteMatcher::class));

if (!class_exists('Str')) {
// Lumen may not have the aliases set up, and we don't want to have to use the FQN in our blade files.
class_alias(\Illuminate\Support\Str::class, 'Str');
}
}

/**
* Initializing routes in the application.
* Add docs routes for users that want their docs to pass through their Laravel app.
*/
protected function bootRoutes()
{
Expand Down

0 comments on commit 2b523a5

Please sign in to comment.