Download the PHP package izniburak/laravel-auto-routes without Composer

On this page you can find all versions of the php package izniburak/laravel-auto-routes. 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-auto-routes

Laravel Auto Routes

Total Downloads Latest Stable Version Latest Unstable Version License

Automatically Route Generator & Discovery Package for Laravel.

Features

Install

Supported Laravel Versions:

Run the following command directly in your Project path:

OR open your composer.json file and add the package like this:

after run the install command.

The service provider of the Package will be automatically discovered by Laravel.

After that, you should publish the config file via following command:

Greate! You can start to use Auto Route Package.

Usage

Open web.php or api.php files in routes directory, and add a new route that will be generated automatically:

All methods will be automatically generated by the AutoRoute Package.

Details

Methods

Ajax Supported Methods

Also, you can add AJAX supported routes. For example; If you want to have a route which only access with GET method and XMLHttpRequest, you can define it simply. This package has some AJAX supported methods. These are;

As you see, you need to add only x char as prefix to define the AJAX supported routes. If you want to support XMLHttpRequest and all HTTP methods which supported by Laravel, you can use xany prefix.

For AJAX supported methods, the package will automatically add a middleware in order to check XMLHttpRequest for the routes. This middleware throws a MethodNotAllowedException exception. But, you can change this middleware from auto-routes.php file in config directory, if you want.

Options

Options array may contain all Laravel route attributes like name, middleware, namespace, etc..

In addition, you can add patterns into the Options array in order to define new patterns for the parameters of the methods in the Controllers. For example:

According to example above, you can use $id and $value parameters in all methods in the Controller. And for these parameters, the rules you defined will be applied.

Also, to define default patterns for the parameters, you can modify patterns in auto-route.php file.

According to first example above, only two methods will be generated. And according to other example, all methods will be generated except two methods which specified.

Parameters

Also, you can use parameter type to use compatible pattern for the parameter. Parameter types can be int, string, float and bool. For example:

If you define patterns for these variable names in the auto-route.php configuration file, your definition will be used for the value checking.

To use int, float, string and bool patterns quickly for your parameters, you can use parameter type directly.

Livewire & Volt support

You can define Livewire or Volt component routes directly in your controller by using Auto Routes package! For this, you should add new methods which have prefix volt or wire. That's it. Auto Routes package will automatically discover your Livewire routes and add them into the application routes.

As you see; for both methods, you must return a string value that Volt component path string or Livewire component class string. Now, you can access your Livewire components.

Support

You can use Issues

izniburak's homepage

izniburak's twitter

Licence

MIT Licence

Contributing

  1. Fork it ( https://github.com/izniburak/laravel-auto-routes/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors


All versions of laravel-auto-routes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 izniburak/laravel-auto-routes contains the following files

Loading the files please wait ....