laravel-ban icon indicating copy to clipboard operation
laravel-ban copied to clipboard

Middleware response field customization

Open antimech opened this issue 6 years ago • 2 comments

It would be cool to be able to change login for Laravel's default email here: https://github.com/cybercog/laravel-ban/blob/8b78c2fc86a9a9e050a730149c9466025a673660/src/Http/Middleware/LogsOutBannedUser.php#L57

And here: https://github.com/cybercog/laravel-ban/blob/8b78c2fc86a9a9e050a730149c9466025a673660/src/Http/Middleware/ForbidBannedUser.php#L51

This way it would work out-of-the-box with Laravel.

Currently my workaround is middleware override.

antimech avatar Aug 19 '19 09:08 antimech

There are many middleware issues at this moment, because its pretty hard to make them generic for all of the projects. Personally I write my own implementations for them and using these middlewares as an examples. I like your idea, it will be good to have them work with default Laravel installation out of the box.

It's a breaking change and could be done only in next major release.

antonkomarev avatar Aug 19 '19 10:08 antonkomarev

@antonkomarev thanks!

antimech avatar Aug 19 '19 10:08 antimech