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: Fields permalink: /fields nav_order: 4 has_children: true

Fields


In the context of the Logger class, you have the flexibility to define which fields and relations should be logged for your model. This allows you to track changes to specific attributes and related data.

Badge

$logger->fields([
   'name' => 'badge:danger',
   // Field::make('name')->badge('danger'),
])

Screenshot


Enum

$logger->fields([
   Field::make('status')
         ->enum(App\Enums\OrderStatus::class)
         ->label('Status'),
])

Screenshot


Date & Time

$logger->fields([
   // 'published_at' => 'date:j F, Y'',
   // 'published_at' => 'time',
   // 'published_at' => 'datetime',
   Field::make('published_at')
         ->date()
         ->label('Publish Date'),
])

Screenshot


Boolean

$logger->fields([
   // 'is_visible' => 'boolean',
   Field::make('is_visible')
         ->boolean()
         ->label('Visible'),
])

Screenshot


Media

$logger->fields([
   // 'media' => 'media',
   Field::make('media')
         ->media(gallery: true)
         ->label('Images'),
])

Screenshot


Money

$logger->fields([
   // 'price' => 'money:EUR',
   Field::make('price')->money('EUR'),
])

Screenshot


Key-Value

$logger->fields([
   Field::make('meta')
         ->keyValue(differenceOnly: true)
         ->label('Attributes'),
])

Key-Value with fields

$logger->fields([
   Field::make('recipient')
         ->hasOne('recipient')
         ->keyValue([
            Field::make('recipient.full_name'),
            Field::make('recipient.phone'),
            Field::make('recipient.shipping_provider'),
         ]),
])

Screenshot


Relation

$logger->fields([
   Field::make('roles.name')
         ->hasMany('roles')
         ->label(__('Roles'))
         ->badge(),

   Field::make('permissions.name')
         ->hasMany('permissions')
         ->label(__('Permissions'))
         ->badge(),

   Field::make('status.name')
         ->hasOne('status')
         ->label(__('Status'))
         ->badge(),
])

Screenshot


Table

$logger
   ->preloadRelations('items.product')
   ->fields([
      Field::make('items')
            ->hasMany('items')
            ->table([
                Field::make('product.name')->hasOne('product'),
                Field::make('qty'),
                Field::make('unit_price'),
            ])
            ->label('Items'),
        ]),

Screenshot


Difference

$logger->fields([
   Field::make('description')
         ->difference(),
])

{: .note } For now, it is compatible with text only.

Screenshot


Inline

$logger->fields([
   Field::make('active')
         ->boolean()
         ->inline(), // <----- here
])

{: .note } Change is displayed inside the header. Only works if only one field has been changed.

Screenshot

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