Skip to content

Commit

Permalink
feat: 适配 laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
jiannei committed Dec 14, 2020
1 parent a24d9e5 commit c7cc89a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/Providers/LumenServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@

class LumenServiceProvider extends LaravelServiceProvider
{
protected function boot()
{
$this->app->configure('response');
}

protected function setupConfig()
{
$path = dirname(__DIR__, 2).'/config/response.php';

$this->app->configure('response');

$this->mergeConfigFrom($path, 'response');
}
}
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Jiannei\Response\Laravel\Tests;

use Jiannei\Response\Laravel\Providers\LumenServiceProvider;
use Jiannei\Response\Laravel\Providers\LaravelServiceProvider;
use Jiannei\Response\Laravel\Tests\Repositories\Enums\ResponseCodeEnum;

abstract class TestCase extends \Orchestra\Testbench\TestCase
Expand All @@ -30,7 +30,7 @@ protected function setUp(): void
protected function getPackageProviders($app)
{
return [
LumenServiceProvider::class,
LaravelServiceProvider::class,
];
}

Expand Down

0 comments on commit c7cc89a

Please sign in to comment.