Download the PHP package wnx/laravel-stats without Composer

On this page you can find all versions of the php package wnx/laravel-stats. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-stats

Laravel Stats

Buy us a tree

Get insights about your Laravel or Lumen Project.

Screenshot

Installing

The easiest way to install the package is by using composer.

The package will automatically register itself.

If you're using Lumen you have to manually register the Service Provider in your bootstrap/app.php file:

Optionally, you can publish the config file in your Laravel applications with the following command:

Usage

After installing you can generate the statistics by running the following Artisan Command.

(Make sure you run php artisan config:clear before running the above command.)

The statistics are also available as JSON.

If you want a more detailed report and see which classes have been grouped into which component, you can use the --verbose-option.

The verbose option is available for the JSON format also.

Note If your project is using Pest PHP for writing tests, these files will automatically be excluded from the statistics. Due to how "laravel-stats" works internally, Pest PHP tests can't currently be detected. See #194 for more information.

How does this package detect certain Laravel Components?

The package scans the files defined in the paths-array in the configuration file. It then applies Classifiers to those classes to determine which Laravel Component the class represents.

Component Classification
Livewire Components Must extend Livewire\Component
Controller Must be registered with a Route & does not extend Livewire\Component
Model Must extend Illuminate\Database\Eloquent\Model
Command Must extend Illuminate\Console\Command
Rule Must extend Illuminate\Contracts\Validation\Rule
Policy The Policy must be registered in your AuthServiceProvider
Middleware The Middleware must be registered in your Http-Kernel
Event Must use Illuminate\Foundation\Events\Dispatchable-Trait
Event Listener Must be registered for an Event in EventServiceProvider
Mail Must extend Illuminate\Mail\Mailable
Notification Must extend Illuminate\Notifications\Notification
Nova Action Must extend Laravel\Nova\Actions\Action
Nova Dashboard Must extend Laravel\Nova\Dashboard
Nova Filter Must extend Laravel\Nova\Filters\Filter
Nova Lens Must extend Laravel\Nova\Lenses\Lens
Nova Resource Must extend Laravel\Nova\Resource
Job Must use Illuminate\Foundation\Bus\Dispatchable-Trait
Migration Must extend Illuminate\Database\Migrations\Migration
Request Must extend Illuminate\Foundation\Http\FormRequest
Resource Must extend Illuminate\Http\Resources\Json\JsonResource or Illuminate\Http\Resources\Json\ResourceCollection
Seeder Must extend Illuminate\Database\Seeder
ServiceProvider Must extend Illuminate\Support\ServiceProvider
Blade Components Must extend Illuminate\View\Component
Custom Casts Must implement Illuminate\Contracts\Database\Eloquent\CastsAttributes or Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes
Database Factory Must extend Illuminate\Database\Eloquent\Factory
Dusk Tests Must extend Laravel\Dusk\TestCase
BrowserKit Test Must extend Laravel\BrowserKitTesting\TestCase
PHPUnit Test Must extend PHPUnit\Framework\TestCase

Create your own Classifiers

If your application has it's own components you would like to see in laravel-stats you can create your own "Classifiers". Create your own Classifiers by implementing the Classifier-contract and adding the class to the stats.custom_component_classifier config array.

For example:

Treeware

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees here offset.earth/treeware

Read more about Treeware at treeware.earth

Running the tests

The package has tests written in phpunit. You can run them with the following command.

Running the command in a local test project

If you're working on the package locally and want to just run the command in a demo project you can use the composer path-repository format. Add the following snippet to the composer.json in your demo project.

And "install" the package with composer require wnx/laravel-stats. The package should now be symlinked in your demo project.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of laravel-stats with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
illuminate/console Version ^9.0 | ^10.0 | ^11.0
illuminate/support Version ^9.0 | ^10.0| ^11.0
stefanzweifel/laravel-stats-phploc Version ^7.0 | ^8.0
symfony/finder Version ^6.0 | ^7.0
symfony/process Version ^6.0 | ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wnx/laravel-stats contains the following files

Loading the files please wait ....