Download the PHP package bfg/route without Composer

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

Use PHP 8 attributes to register routes in a Laravel app

Latest Version on Packagist

This package provides annotations to automatically register routes. Here's a quick example:

This attribute will automatically register this route:

Installation

You can install the package via composer:

Usage

In your RouteServiceProvider, delete where your controllers are located and he will do the rest for you:

The package provides several annotations that should be put on controller classes and methods. These annotations will be used to automatically register routes

Adding a GET route

This attribute will automatically register this route:

Using other HTTP verbs

We have left no HTTP verb behind. You can use these attributes on controller methods.

Specify a route name

All HTTP verb attributes accept a parameter named name that accepts a route name.

This attribute will automatically register this route:

Adding middleware

All HTTP verb attributes accept a parameter named middleware that accepts a middleware class or an array of middleware classes.

This annotation will automatically register this route:

To apply middleware on all methods of a class you can use the Middleware attribute. You can mix this with applying attribute on a method.

These annotations will automatically register these routes:

Specifying a prefix

You can use the Prefix annotation on a class to prefix the routes of all methods of that class.

These annotations will automatically register these routes:

Specifying a domain

You can use the Domain annotation on a class to prefix the routes of all methods of that class.

These annotations will automatically register these routes:

Deployment

As stated in the documentation which you can see here. After you cache your routes ...

... scanning of your classes will be disabled.

Testing

Inspired by

I took this package into the service and reworked it a little, added a couple of functions, caching and added the ability to extend it a little, I plan to support a more advanced API as far as possible.

License

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


All versions of route with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
bfg/entity Version *
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 bfg/route contains the following files

Loading the files please wait ....