Download the PHP package rickselby/laravel-auto-presenter-mapper without Composer

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

Laravel Auto Presenter Mapper

Packagist Version

This is an extension to the excellent laravel-auto-presenter that allows you to define presenters in a service provider or on-the-fly, rather than directly on the model.

Compatibility Chart

Laravel Auto Presenter Mapper laravel-auto-presenter
3.x 7.x
2.x 6.x
1.x 5.x

Installing

Require the project using Composer:

Laravel 5.5+ will auto-discover the package.

For Laravel 5.1-5.4, you should only add this service provider, not the original laravel-auto-presenter service provider, as this one extends it.

In your config/app.php add this line to your 'providers' array...

... and this line to your 'facades' array.

Usage

Read the docs at github.com/laravel-auto-presenter/laravel-auto-presenter for the basic use cases.

With this package, instead of altering your models to implement HasPresenter, you can define the presenters in a service provider using the facade. For example:

This will work exactly how the laravel-auto-presenter works; any User models passed to a view will be wrapped in UserPresenter.

The map function also takes an array:

If you wish to declare a mapping on-the-fly, or override a mapping in a specific instance, the facade can be called from anywhere:

Decoratable

To mimic the Decoratable interface of the parent package, you can call decoratable:

License

Laravel Auto Presenter Mapper is licensed under The MIT License (MIT).


All versions of laravel-auto-presenter-mapper with dependencies

PHP Build Version
Package Version
Requires mccool/laravel-auto-presenter Version ^7.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 rickselby/laravel-auto-presenter-mapper contains the following files

Loading the files please wait ....