Weave 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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin