Download the PHP package jlorente/laravel-identitystamps without Composer

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

Laravel IdentityStamps Plugin

A Laravel plugin to register and keep control of users who make creations, updates and deletions of models.

With this plugin, you will manage automatically the control fields "created_by", "updated_by" and "deleted_by" that will store the identity of the users that manipulate the models.

Installation

The preferred way to install this extension is through composer.

With Composer installed, you can then install the extension using the following commands:

or add

to the section of your composer.json file.

Configuration

Register the ServiceProvider in your config/app.php service provider list.

config/app.php

Usage

On Migrations

You can use the Blueprint method identityStamps() to add nullable "created_by" and "updated_by" UNSIGNED INTEGER equivalent columns. Of course, you can create the columns by yourself with a custom name and type and then configure the Model class with these names, but remember that the type should be the same as the type of the key of your UserModel.

If you use soft deletes, maybe you want to add an identity stamp for the deletion too. You can do this by using the softDeletesIdentityStamps() method that will add a nullable "deleted_by" UNSIGNED INTEGER column.

Attaching the behavior to a Model

To enable identity stamps for a model, use the Jlorente\IdentityStamp\Eloquent\IdentityStamps trait on the model:

Further considerations

Using custom attributes names

You can use your custom attributes names to store the identity by defining class constants on the model.

If you don't like class constants you can also override the trait methods that resolve the identity stamp fields.

Using custom identity id to be stored in the identity fields

By default, the trait will use Laravel's Auth::id() method to retrieve the id that will be stored on the identity stamp fields. Feel free to override the method getIdentityStampValue() to return the value that you want to store in the fields.

License

Copyright © 2019 José Lorente Martín [email protected].

Licensed under the BSD 3-Clause License. See LICENSE.txt for details.


All versions of laravel-identitystamps with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
illuminate/support Version >=5.5
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 jlorente/laravel-identitystamps contains the following files

Loading the files please wait ....