Download the PHP package gottvergessen/activity without Composer

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

activity

Lightweight Laravel activity logging package.

Goal

Make this package installable by consumers via Composer and Packagist.

Steps to publish

  1. Create a standalone GitHub repository (e.g. gottvergessen/activity) and push this activity/ folder as the repository root.
  2. On Packagist, submit the repository or enable GitHub auto-update.
  3. In the GitHub repository, add a secret named PACKAGIST_TOKEN with your Packagist API token.
  4. Create a tag (e.g. v1.0.0) and push the tag; the workflow will notify Packagist to update.

Installation (for consumers)

After publishing to Packagist, consumers can run:

Development notes

CI

The repository includes a GitHub Actions workflow that notifies Packagist on new tags. See .github/workflows/notify-packagist.yml.

Logger

Tests Packagist Version

Logger is a lightweight, opinionated activity logging package for Laravel that automatically tracks model changes and records who did what, to which model, and when — without polluting your domain logic.

Features:

Installation

You can install the package via composer:

Publish Assets

Publish the configuration file and migrations:

This will create:

You can also publish assets separately:

Run Migrations

After publishing, run the migrations to create the activity_logs table:

Pruning Old Logs

To keep your database clean, you can prune old activity logs:

config/activity.php

Basic usage

Now all changes to the User model are automatically logged:

Log Relation-Only Changes (Pivot Attach/Detach/Sync)

Pivot operations like syncWithoutDetaching() and detach() do not mutate the tracked model's own attributes, so they won't produce automatic updated activity entries by themselves.

Use logActivity() in your model methods to explicitly record those changes:

Ignore Specific Fields per Model

Ignore Seeding

If you seed data during local development or tests, you can keep the package from recording those model events by leaving activity.ignore_seeding enabled.

Set it to false if you want seeder-driven model changes to be logged too.

Database Schema

The activity_logs table tracks the following information:

Column Type Description
id ID Primary key
event string The event type (created, updated, deleted, restored). Events can be resolved into custom actions and descriptions
action string Custom semantic action defined by the model (optional)
log string Log category for grouping activities
description string Description of the activity (optional)
subject_type string The model class that was changed
subject_id int The ID of the model that was changed
causer_type string The model class of the user who made the change (optional)
causer_id int The ID of the user who made the change (optional)
properties json The model attributes that changed
meta json Metadata including IP, user agent, HTTP method, and host
batch_id string Batch ID for grouping related changes (optional)
created_at timestamp When the activity was recorded
updated_at timestamp When the activity record was last updated

Eloquent Friendly

Add the InteractsWithActivity trait to easily query a model's activities:

Now you can access activities directly from your models:

The InteractsWithActivity trait is optional and only required if you want to access $model->activities().

Per-Model Event Control

Advanced Usage

Custom Log Name per Model

Custom Action per Model

Custom Description per Model

Batch Operations

Group multiple model changes under a single batch ID:

Temporarily Disable Logging

You can temporarily disable activity logging when needed:

Query Scopes

The Activity model provides convenient query scopes:

Audit Trail

Document History

For more examples and patterns, see EXAMPLES.md.

License

The MIT License (MIT). Please see License File for more information.


All versions of activity with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
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 gottvergessen/activity contains the following files

Loading the files please wait ...