Faysal Ahamed

Full-stack Web Developer

Code statistics of Laravel Application

by Faysal Ahamed

Recently I have seen a tweet of @dhh, creator of Ruby on Rails that showing code statistics of one of his recent project. I was wondering if Laravel has anything like that.

I tweeted mentioning several Laravel devs and found a nice package which did similar stats that I have seen from DHH. Install the package: https://github.com/stefanzweifel/laravel-stats Then run:

1php artisan stats

It will return total number of Classes, Controllers, Models, Tests etc as well as number of methods per class, line of codes per methods etc.

These statistics are helpful to see the overview of an applications code style.