James Singizi
2 min readSep 30, 2019
Laravel stats output example

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, Laravle 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.

Installation procedure:

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

composer require “wnx/laravel-stats” — dev

Composer will got ahead and install all dependancies 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

‘providers’ => [ \Wnx\LaravelStats\StatsServiceProvider::class, ]

Running the commands

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

php artisan stats

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

php artisan stats — json

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)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

James Singizi
James Singizi

Written by James Singizi

James is a software developer with more than 3 years experience with PHP and Python. He is passionate about code and software development

No responses yet

Write a response