Skip to content

Commit

Permalink
Fix Facade
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomotol committed Oct 12, 2020
1 parent 13ac1b5 commit b11e42f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.2.1 (2020-10-12)

- Fixed `AuthTimeout` facade.

## v2.2.0 (2020-10-12)

- Added `AuthTimeout` facade.
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"laravel": {
"providers": [
"JulioMotol\\AuthTimeout\\ServiceProvider"
]
],
"aliases": {
"AuthTimeout": "JulioMotol\\AuthTimeout\\Facades\\AuthTimeout"
}
}
}
}
2 changes: 1 addition & 1 deletion src/Facades/AuthTimeout.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class AuthTimeout extends Facade
{
protected static function getFacadeAccessor()
{
throw AuthTimeoutContract::class;
return AuthTimeoutContract::class;
}
}
2 changes: 0 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ public function register()
$this->app->singleton(AuthTimeoutContract::class, function ($app) {
return new AuthTimeout($app['auth'], $app['events'], $app['session']);
});

$this->app->alias(AuthTimeoutContract::class, 'AuthTimeout');
}
}
8 changes: 8 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace JulioMotol\AuthTimeout\Tests;

use JulioMotol\AuthTimeout\Facades\AuthTimeout;
use JulioMotol\AuthTimeout\ServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

Expand All @@ -13,4 +14,11 @@ protected function getPackageProviders($app)
ServiceProvider::class,
];
}

protected function getPackageAliases($app)
{
return [
'AuthTimeout' => AuthTimeout::class
];
}
}

0 comments on commit b11e42f

Please sign in to comment.