Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
noxoua committed Nov 3, 2023
1 parent a87c411 commit 98482d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/003-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Once `UserLogger` is created, it immediately starts listening to model events.
Here's a simple example of how to create a Logger for a User model:

```php
use App\Filament\Resources\UserResource;
use App\Models\User;
use Illuminate\Contracts\Support\Htmlable;
use Noxo\FilamentActivityLog\Fields\Fields;
use Noxo\FilamentActivityLog\Fields\Field;
use Noxo\FilamentActivityLog\Loggers\Logger;
Expand All @@ -44,6 +46,12 @@ class UserLogger extends Logger
'restored',
];

public static function getLabel(): string|Htmlable|null
{
// return __('User');
return UserResource::getModelLabel();
}

public static function fields(Fields $fields): Fields
{
return $fields->schema([
Expand Down

0 comments on commit 98482d4

Please sign in to comment.