Miftah Afina
Miftah Afina

Reputation: 295

How to show render time / page load time in Laravel?

I'm using Laravel and want to display render time / page load time in my web application. Can you help me?

Upvotes: 19

Views: 14184

Answers (3)

lieroes
lieroes

Reputation: 694

You can use for debugging one of those package: barryvdh/laravel-debugbar or sebklaus/profiler

Upvotes: 0

Maksym
Maksym

Reputation: 3428

I would recommend barryvdh/laravel-debugbar package which can give you plenty of informations about request including executed queries, various load times and many more.

Upvotes: 6

Wader
Wader

Reputation: 9883

Laravel defines a LARAVEL_START constant which contains the microtime of when the framework started booting. You could use that to calculate the difference.

You can use the following

This page took {{ (microtime(true) - LARAVEL_START) }} seconds to render

Upvotes: 57

Related Questions