Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
use require_once to avoid re-declaration of classes in routes.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulkave committed Nov 2, 2016
1 parent f6b396f commit 6f1291e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/LucidServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
use Illuminate\Support\ServiceProvider;
use Stevebauman\LogReader\LogReaderServiceProvider;

/**
* @author Abed Halawi <[email protected]>
*/
/**
* @author Abed Halawi <[email protected]>
*/
class LucidServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
{
if (! $this->app->routesAreCached()) {
require __DIR__.'/Http/routes.php';
if (!$this->app->routesAreCached()) {
require_once __DIR__.'/Http/routes.php';
}

$this->loadViewsFrom(__DIR__.'/../resources/views', 'lucid');
Expand All @@ -39,8 +37,6 @@ public function boot()

/**
* Register bindings in the container.
*
* @return void
*/
public function register()
{
Expand Down

0 comments on commit 6f1291e

Please sign in to comment.