Download the PHP package royvoetman/laravel-prefixer without Composer

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

Laravel Prefixer

Introduction

This packages allows you to define a prefix in your controller which will be automatically appended to your view and/or route names.

In a resource controller, it is a common pattern to have all the associated views in the same folder, and the same goes for the location of your routes. With this feature, you can define a prefix which is automatically appended to your view-name or route-name.

Latest Version Total Downloads

Installation

View prefixes

When you want to use View prefixes your controller will have to implement the RoyVoetman\Prefixer\Contracts\ViewPrefix interface. This interface requires you to add a viewPrefix method that returns a string.

Second your Controller must include the RoyVoetman\Prefixer\Http\Traits\CreatesViews trait. This trait includes the view(string $view) method to the controller which handles the prefixing for us. The best practice is to include this trait in your BaseController . This method checks if the CreatesViews interface is implemented, if this is not the case this method will behave the same as the view() global helper function.

Route prefixes

Route prefixing works the same as View Prefixing except for the following:

The Controller must implement the RoyVoetman\Prefixer\Contracts\RoutePrefix interface and must include the RoyVoetman\Prefixer\Http\Traits\ForwardsRequests trait.

Instead of the viewPrefix method, you have to include a routePrefix method. And instead of the view(string $view) method you have to use the redirect(string $route) method. When the RoutePrefix method is not implemented this method will behave the same as calling redirect()->route($route).

Route prefixes only work if you are using named routes.

View and Route prefixes

There is a convenient shortcut when you want to implement the ViewPrefix and the RoutePrefix interface. You can include the RoyVoetman\Prefixer\Contracts\ResponsePrefixes interface which just extends both interfaces.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.

Pull Requests

License

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


All versions of laravel-prefixer with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^5.7|^5.8|^5.9|^6.0|^7.0|^8.0|^9.0|^10.0
php Version ^7.2 || ^8.0
illuminate/http Version ^5.7|^6.0|^7.0|^8.0|^9.0|^10.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 royvoetman/laravel-prefixer contains the following files

Loading the files please wait ...