Download the PHP package julienbourdeau/route-usage without Composer

On this page you can find all versions of the php package julienbourdeau/route-usage. 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 route-usage

Route Usage for Laravel

Latest Version on Packagist Build Status

This package keeps track of all requests to know what controller method, and when it was called. The goal is not to build some sort of analytics but to find out if there are unused endpoints or controller method.

After a few years, any projects have dead code and unused endpoint. Typically, you removed a link on your frontend, nothing ever links to that old /special-page. You want to remove it, but you're not sure. Have look at the route_usage table and figure out when this page was accessed for the last time. Last week? Better keep it for now. 3 years ago? REMOVE THE CODE! 🥳

/route-usage screenshot php artisan usage:route screenshot

Installation

You can install the package via composer:

Run migrations to create the new route_usage table.

Publish configuration

Usage

To access the route usage, you can do it in your terminal with the command.

To access the HTML table, you'll first need to define who can access it. By default, it's available only on local environment.

In your AuthServiceProvide, in the boot method, define who can access this page:

Then, head over to yourapp.tld/route-usage.

Configuration

excluding-regex

Here you may specify regex to exclude routes from being logged. Typically, you want may want to exclude routes from packages or dev controllers. The value must be a valid regex or anything falsy.

Notes

Road to 1.0 release

Less SQL queries

I'll like to reduce the number of SQL queries performed. Typically, if a route is called, we don't need to log usage for the next 5 minutes. I'm thinking we could use some cache or split the data: attributes in mysql but last used date in Redis.

💡 Feel free to open an issue to discuss your ideas.

More package to ignore

Today, we ignore routes from Nova or Debugbar because there is nothing you can do about these routes. I'd like to support more packages out of the box.

📦 What package would you like to see added?

About

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

License

The MIT License (MIT). Please see License File for more information.


All versions of route-usage with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.1
laravel/framework Version >= 5.8
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 julienbourdeau/route-usage contains the following files

Loading the files please wait ....