Download the PHP package igorwanbarros/custom-accessor-and-mutator without Composer

On this page you can find all versions of the php package igorwanbarros/custom-accessor-and-mutator. 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 custom-accessor-and-mutator

Custom Accessors and Mutators

Accessors e Mutators Personalizados

The CustomAccessorsAndMutators is a package to optimize the creation of accessor and mutator laravel. The focus is to set the accessors and mutators through an array informing the attribute as key and the method as value.

A CustomAccessorsAndMutators é um pacote para otimizar a criação de accessor e mutator laravel. O foco é setar os accessors e mutators através de um array informando o atributo como chave e o metodo como valor.

Installation

Instalação

Composer

If you already use Composer (which is highly recommended), add the dependency under the policy "require" your composer.json:

Se você já utiliza o Composer (o que é extremamente recomendado), adicione a dependência abaixo à diretiva "require" do seu composer.json:

Usage

Uso

The package uses the trait CustomAccessorsAndMutators to set the attributes, just add it in their class, as shown below:

O pacote utiliza a trait CustomAccessorsAndMutators para setar os atributos, para isso basta adiciona-la em suas classes, conforme mostrado abaixo:

Or, in your Model class base:

Ou, em sua class Model base:

And in other models add only the fields and their respective methods:

E nos demais models adicionar apenas os campos e seus respectivos métodos:

Adding via Class

Adicionando via Class

You can also implement the FormatAccessorsAndMutator class to define your formatting logic (for certain types of data for example) and tells you there as shown below:

Você pode também implementar a classe FormatAccessorsAndMutator para definir sua lógica de formatação (para determinados tipos de dados por exemplo) e informa-lá conforme é mostrado abaixo:

Already in its Model class you can set as follows:

Já em sua classe Model você pode definir da seguinte forma:

Licence

MIT Licence


All versions of custom-accessor-and-mutator with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 5.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 igorwanbarros/custom-accessor-and-mutator contains the following files

Loading the files please wait ....