generated from fintechbd/package-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd8be55
commit aa385d1
Showing
8 changed files
with
106 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Fintech\Auth; | ||
|
||
use Fintech\Auth\Listeners\LockoutEventListener; | ||
use Illuminate\Auth\Events\Lockout; | ||
use Illuminate\Auth\Events\Registered; | ||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; | ||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | ||
use Illuminate\Support\Facades\Event; | ||
|
||
class EventServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* The event to listener mappings for the application. | ||
* | ||
* @var array<class-string, array<int, class-string>> | ||
*/ | ||
protected $listen = [ | ||
Lockout::class => [ | ||
LockoutEventListener::class, | ||
], | ||
]; | ||
|
||
/** | ||
* Register any events for your application. | ||
*/ | ||
public function boot(): void | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Determine if events and listeners should be automatically discovered. | ||
*/ | ||
public function shouldDiscoverEvents(): bool | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Fintech\Auth\Listeners; | ||
|
||
use Illuminate\Auth\Events\Lockout; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Queue\InteractsWithQueue; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class LockoutEventListener | ||
{ | ||
/** | ||
* Handle the event. | ||
* @param Lockout $event | ||
*/ | ||
public function handle(Lockout $event): void | ||
{ | ||
// abort(Response::HTTP_LOCKED, trans('auth.throttle', [ | ||
// 'seconds' => $seconds, | ||
// 'minutes' => ceil($seconds / 60), | ||
// ])); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters