Download the PHP package lara-igniter/activitylog without Composer

On this page you can find all versions of the php package lara-igniter/activitylog. 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 activitylog

Laraigniter activity log

Auditable activity logging for Laraigniter applications. It uses Elegant\Database\Model\Model, CodeIgniter config groups, and the existing Laraigniter model-event arrays; it has no Laravel or Eloquent dependency.

Installation

Install the package:

Add the provider to config/hooks.php before application providers:

Publish and run the migration

The activity log table is required. Publish the package migration:

Then run the migration:

Publish the configuration (optional)

The package loads its bundled defaults automatically. Publish an editable application override only when needed:

The published config/activitylog.php is loaded after the package defaults and therefore overrides them. Use --force only when you intentionally want to overwrite an existing published file.

Log an activity explicitly

Pass a Laraigniter model instance and the persisted subject ID. The framework's read results are data objects, so the ID is explicit when logging from a model service/repository.

The authenticated Ion Auth user is attached automatically. Use causedBy() to supply another actor, or causedByAnonymous() to suppress it.

Automatically log model events

Use LogsActivity in an Model class and return its options:

The trait records created, updated, deleted, force_deleted, and restored events. deleted represents a soft delete; force_deleted represents a permanent deletion. For a single-record update, it captures the persisted row before the write and stores Laravel-style changes: new values under attribute_changes.attributes and previous values under attribute_changes.old. With logOnlyDirty(), unchanged attributes are excluded from both collections.

Polymorphic model context

For a logged model with polymorphic columns, declare the relationship prefix with logMorphs(). The type and ID are stored in the activity properties.polymorphic_relations collection, separately from the attribute changes.

Multiple relations are supported: ->logMorphs(['emailable', 'receiptable']). The activity-log UI can render every configured relation without model-specific conditions.

Query logs and retention

Cleanup command

Clean records older than the configured clean_after_days value:

Override the retention period or clean one named log only:

Delete every activity record explicitly, or every record in one named log:

--all permanently deletes matching activity records and cannot be combined with --days.

Set ACTIVITYLOG_ENABLED=false to stop persistence. The default configuration excludes password and remember_token; extend default_except_attributes for additional sensitive fields.


All versions of activitylog with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-json Version *
lara-igniter/enum Version ^1.0
lara-igniter/framework Version ^1.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 lara-igniter/activitylog contains the following files

Loading the files please wait ...