Download the PHP package bbs-lab/nova-action-event-columns without Composer

On this page you can find all versions of the php package bbs-lab/nova-action-event-columns. 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 nova-action-event-columns

Nova Action Event Columns

Latest Version on Packagist Tests Total Downloads

Add extra columns to Laravel Nova's action_events table and fill them automatically on every action. The client IP address (ip_address) ships as a built-in column; your app can register additional columnstenant_id, user_agent, anything — without forking, through a small resolver registry.

Nova writes action_events through two internal paths (event-firing ->save() and event-bypassing mass ::insert()), and only fires Eloquent events on one of them. This package hooks both, so your columns are populated no matter how the event is created: create, update, attach, delete, force-delete, restore, and every custom Nova action. Works on Nova 4 and Nova 5.

Screenshots

Split diagonally: light theme (top-left) / dark theme (bottom-right).

The auto-registered "Action Events" resource, with the built-in ip_address column filled on every event:

An event's detail page shows every column as a field — including the built-in IP:

Features

Requirements

Both Nova majors are exercised in CI. Note that Nova 4 (through its inertiajs/inertia-laravel dependency) tops out at PHP 8.4 and Laravel 11; on PHP 8.5 or Laravel 12+, use Nova 5. Composer resolves the right combination for you.

Installation

Because Nova is a paid, private package, make sure your application is already authenticated against nova.laravel.com, then:

The service provider auto-registers via Laravel package discovery. The ip_address migration runs automatically. Publish the config, migration or custom-column stub if you want to tweak them:

Activation

Nova only records into a custom action_events model when you point its action resource at this package. In config/nova.php:

Then run php artisan migrate. Until this is set, Nova uses its own action resource and your extra columns stay null.

Usage

The built-in IP column

Once activated and migrated, every action event stores the request IP in ip_address — nothing else to do. Toggle it in config/nova-action-event-columns.php (env NOVA_ACTION_EVENT_COLUMNS_IP_ENABLED).

Registering custom columns

Register columns from a service provider's boot()in code, never in config, because closures cannot be serialized by config:cache. Each column gets a resolver (the value to store) and an optional field factory (how it shows in Nova):

You must provision the database column yourself; publish the stub (--tag=nova-action-event-columns-stub), rename it, set the column name/type, and migrate.

Viewing the events in Nova

The package's Nova\ActionResource extends Nova's own and adds a field for each registered column — your registered field if you supplied one, otherwise the read-only default. The built-in ip_address ships as an "IP" field.

It is auto-registered as a navigable resource, so an "Action Events" entry appears in the Nova sidebar and you can browse every event with its columns — no Nova::resources() wiring required. Events also appear on a record's detail page (Nova's built-in action-event feed). To opt out of the navigation entry — to register your own resource, or to keep Nova's default where events show only on detail pages — set register_resource to false (env NOVA_ACTION_EVENT_COLUMNS_REGISTER_RESOURCE).

The action-events:prune command

Retention for the action_events table:

A window (--days / --hours) or --all is required — with neither, the command refuses. It is never auto-scheduled; wire it up yourself if you want it periodic:

TrustProxies caveat

request()->ip() reflects the real client only if your app trusts its proxies. Behind a load balancer, configure trusted proxies so the forwarded header is honoured:

If you trust proxies as *, the forwarded IP is client-spoofable — treat ip_address as a best-effort audit signal, not hard proof.

Testing

A full embedded Nova app (via Orchestra Workbench) lets you exercise the flow in a real Nova instance:

Security

The built-in ip_address is captured on a best-effort basis and is only trustworthy when proxies are configured correctly (see the TrustProxies caveat). If you discover a security issue, please email [email protected] instead of using the issue tracker.

Changelog

Please see CHANGELOG for what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of nova-action-event-columns with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0 || ^12.0 || ^13.0
laravel/nova Version ^4.0 || ^5.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 bbs-lab/nova-action-event-columns contains the following files

Loading the files please wait ...