Download the PHP package mehrdad-dadkhah/laravel-vroute without Composer

On this page you can find all versions of the php package mehrdad-dadkhah/laravel-vroute. 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-vroute

Laravel-VRoute

PHP library for laravel to add automated/conventional routes with versioning.

This package help developers and teams to have versioning URI base on project structure, and no need to write new line of code for new route.

This package is configable for example you can change template of controller names and ....

If you have method in version 1 of and you call so router call index method of version 1 immidately, but if call what happen?

you have 3 choice:

  1. move all codes from version 1 to version 2!

  2. add new route for that point to version 1!

  3. in your application you use different version of api base on active version of it! you have know multiple active api version, you should support all, you should remember or check every day! where which version is in use and .....

So to fix this problem/need I develop this package. VRoute for check version 2 of PostController and if it has not this method automatically switch to one version.

Maybe you ask this process is heavy and may make performance problem, yes but I add good caching system to it and we process only one time.

Benefit case and samples

  1. Simplification and less code

    Before using VRoute you may have something like this:

    And after use VRoute it would be:

  2. Procedural unity
  3. Team conventions
  4. More redable code in controller

    Before use Vroute:

    After use VRoute:

System requirements

Tested with >=7.1, following binaries need to be installed

Installation

Usage

Put this code in your route file (for example routes/api.php)

That's it!

If you have sub-directory in you project, for example admin/client and .... should make them available for VRoute:

How to set a middleware?

You can set middleware in 8 layers or ways!

  1. Set for controller in all version and directory

  2. Set for controller in specific directory (for example only for in sub-dir)

  3. Set for controller in specific version (for example only for in )

  4. Set for controller in specific directory and version (for example only for in sub-dir and only version 1)

  5. Set for controller and specific action(method) (for example only for and action)

  6. Set for controller and specific action(method) in specific version (for example only for and action in )

  7. Set for controller and specific action(method) in specific directory (for example only for and action in sub-dir)

  8. Set for controller and specific action(method) in specific directory and version (for example only for and action in and )

What about you set all 8 kind of middleware for one controller?

From top to bottom, if match the route, all middlewares will be merged.

For example we set:

  1. middleware for (without specify directory and version)

  2. middleware for for directory (without specify version)

  3. middleware for for version (without specify directory)

  4. middleware for for directory and version

Now we call , so all of the middlewares (,,,) will be fire

But If call , only and {HTTPMETHOD}{ActionName}GETProfile```. this convention add to force action about it's method, force methods to response to only one type of http call method and make controller more readable.

To Do

License

laravel-vroute is licensed under the GPLv3 License.


All versions of laravel-vroute with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 mehrdad-dadkhah/laravel-vroute contains the following files

Loading the files please wait ....