php - Laravel 5 many middlewares and performance -


my app have few middlewares run on every request.

i'm wondering performance impact of having many middleware. function call or doing http redirect when 1 middleware pass another.

it possible me join middlewares single middleware modularity, i've separated middleware perform specific task.

i going through middleware docs , founded this:

http middleware provide convenient mechanism filtering http requests entering application. example, laravel includes middleware verifies user of application authenticated. if user not authenticated, middleware redirect user login screen. however, if user authenticated, middleware allow request proceed further application.

and according me, doesn't redirect every time unless , until there failure in condition. so, according me there won't performance issue.


Comments