Home Laravel stats, a cool package for Laravel developers
Post
Cancel

Laravel stats, a cool package for Laravel developers

Laravel Stats

Getting insight about the code in your project is amazing. Whether you are doing it for fun or you want to track the size of your project, Laravel stats provides one of the best ways of checking useful stats on your code.

According to its developers, laravel stats is inspired by rake stats (renamed to rails stats) and its main goal is to provide you with statistics for your code and it does this one thing very well.

Installing Laravel stats

As with all things Laravel, Laravel stats is so easy to install. Installing laravel stats requires composer package manager (You should strongly consider using composer if you are a php developer and you are not using composer yet)

To install Laravel stats on your existing project simply run the following command

1
composer require “wnx/laravel-stats” — dev

Composer will got ahead and install all dependencies for you while you marvel at its ingenuity and craftiness :-)

After installation Laravel stats will automatically register itself but for those who enjoy tinkering with their configuration you can still register it manually by adding the following code to you app/config.php file

1
'providers' => [ \Wnx\LaravelStats\StatsServiceProvider::class]

Running the commands

Now that you have Laravel stats installed its time to play around with it.

1
php artisan stats

The command above will generate stats for you and display them in a nice table. Other commands available include:

1
php artisan stats --json
1
php artisan stats —verbose

Laravel is a web development framework developed by Taylor Otwell

Packagist is a package manager for php(similar to npm for Node)

This post is licensed under CC BY 4.0 by the author.