Download the PHP package regulus/activity-log without Composer

On this page you can find all versions of the php package regulus/activity-log. 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 activity-log

ActivityLog

A simple and clean Laravel 5 activity logger for monitoring user activity on a website or web application.

Installation

Basic installation, service provider registration, and aliasing:

To install ActivityLog, make sure "regulus/activity-log" has been added to Laravel 5's composer.json file.

"require": {
    "regulus/activity-log": "0.6.*"
},

Then run php composer.phar update from the command line. Composer will install the ActivityLog package. Now, all you have to do is register the service provider and set up ActivityLog's alias. In app/config/app.php, add this to the providers array:

Regulus\ActivityLog\ActivityLogServiceProvider::class,

And add this to the aliases array:

'Activity' => Regulus\ActivityLog\Models\Activity::class,

Publishing migrations and configuration:

To publish this package's configuration and migrations, run this from the command line:

php artisan vendor:publish

You will now be able to edit the config file in config/log.php if you wish to customize the configuration of ActivityLog.

Note: Migrations are only published; remember to run them when ready.

To run migration to create ActivityLog's table, run this from the command line:

php artisan migrate

Basic Usage

Logging user activity:

The above code will log an activity for the currently logged in user. The IP address will automatically be saved as well and the developer flag will be set if the user has a developer session variable set to true. This can be used to differentiate activities between the developer and the website administrator. The updated boolean, if set to true, will replace all instances of "Create" or "Add" with "Update" in the description and details fields.

Advanced Usage

As of version 0.6.0, ActivityLog has built in the ability to dynamically create descriptions based on language keys in Laravel's language files. If you would like to enable this feature without having to set language_key to true when you use the log() function, change defaults.language_key to true in the config file (it is not present by default so you will have to add it).

Logging user activity with language keys:

In the example above, the items replacement variable in the description has a number of specified properties before the | character which separates them from the actual language variable. The available properties are as follows:

S - Return the "singular" string (in the case of "labels.record", "Record")
P - Return the "plural" string (in the case of "labels.record", "Records")
A - Prepend the string with "a" or "an" (example: "a record" instead of just "record")
L - Convert the string to lowercase

In our example above, you will see both singular ("S") and plural ("P") are being used. When both are used, the description builder looks for a number replacement variable to decide whether the singular or plural form should be used.

Note: The user replacement variable is automatically set based on the record's user ID.

Getting Linked Content

Set up the content_types config array like the following example:

You can use getContentItem() to get the item based on the specified model (assuming, in the case of the above specified example, that your content type is set to "Item"). You can also use getUrl() to get the URL of the content item or getLinkedDescription() to get a linked description for the item.

Displaying Action Icons

Display an action icon based on config setup:

You can also use getIcon() to get just the icon class from which to build your own icon markup.


All versions of activity-log with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
laravel/framework Version >=5.2.0
regulus/tetra-text Version 0.6.*
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 regulus/activity-log contains the following files

Loading the files please wait ....