Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Activity Log Laravel Package

noxoua/filament-activity-log

View on GitHub
Deep Wiki
Context7

title: Link Causer/Subject permalink: /link-causer-subject nav_order: 9

Link Causer/Subject


In Filament Activity Log, you have the ability to link the "causer" and "subject" of an activity log entry. The "causer" is typically the user who performed an action, while the "subject" is the item or entity that was acted upon. To create links to these "causer" and "subject" pages, you can use the following code as a reference:

use App\Filament\Pages\Activities;

// UserResource
$table->actions([
    // User actions
    Action::make('activities')
        ->url(fn ($record) => Activities::getCauserUrl($record))
])

// ProductResource
$table->actions([
    // History of changes
    Action::make('activities')
        ->url(fn ($record) => Activities::getSubjectUrl($record))
])

The code provides links to the "causer" and "subject" pages based on the context. In the "UserResource" example, it generates links to view the activities of a user. In the "ProductResource" example, it links to view the history of changes related to a product.


By using this approach, you can easily navigate between users, products, or any other entities and access their corresponding activity logs.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky