Coder Social home page Coder Social logo

z3d0x / filament-logger Goto Github PK

View Code? Open in Web Editor NEW
245.0 4.0 38.0 590 KB

Extensible activity logger for filament that works out-of-the-box.

License: MIT License

PHP 100.00%
activity-logger activitylog filamentadmin laravel logger laravel-filament filamentphp log hacktoberfest

filament-logger's Introduction

Hi ๐Ÿ‘‹ I'm ZedoX

Full-Stack Web Developer

I started my web development journey in late 2020. After quickly picking up HTML & CSS, I moved on to learn PHP it's most popular framework, Laravel. Somewhere along the way I also picked up JavaScript & React as well.

Thesedays I mainly work with Laravel. TALL stack (Tailwind, Alpine.js, Laravel, Livewire) to be specific. You may also see me occasionally contributing to open-source projects or hanging around in the Filament Community

Buy Me A Coffee

Socials

Badges

My GitHub Stats

Z3d0X's GitHub stats

Top Repositories





filament-logger's People

Contributors

amiraghaee avatar castellani8 avatar corean avatar cweagans avatar daniel-h123 avatar datlechin avatar dependabot[bot] avatar fsamapoor avatar gapfranco avatar github-actions[bot] avatar homaeee avatar lakuapik avatar laravel-shift avatar marcoguido avatar marcosmarcolin avatar mnurullahsaglam avatar ngfw avatar nicolasbaud avatar pathros avatar robertorinaldi-dev avatar ruswan avatar thapaprabhat avatar thyseus avatar z3d0x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

filament-logger's Issues

In laravel 11 menu Activity Log not effect

I use laravel 11 and i use shield for permission, i success generate ActivityPolicy but not effect.

this AuthServiceProvider
image

this regis AuthServiceProvider
image

and this ActivityPolicy
image

i try to check Users menu and effect but after try Activity menu not effect
image

Translation not translate in filter

The translation key is available, but it is not translate data inside filter (Old and New)

Screenshot from 2023-03-13 10-33-30

And also provide "Can be key or value" translation key

Logger Error When Use Command php artisan migrate:fresh --seed

Hallo.
first of all, I've installed this plugin, and it's really amazing. thank you for making this plugin ๐Ÿ‘.

back on topic, I ran the migration using this command php artisan migrate:fresh --seed. the migration ran successfully, but the seeder didn't run correctly and crashed my mysql..

Then I ran the migration & seed commands separately. strangely the migration command ran fine. but not the seeder.
gambar
gambar

So, the alternative path I chose. set all the key enabled to false
kode

dan itu berjalan lancar tanpa crash.
gambar

menurut saya, masalahnya adalah karena saya menggunakan terminal

harap Anda segera memperbaikinya.Halo.
pertama-tama, saya sudah menginstal plugin ini, dan ini sangat menakjubkan. terima kasih telah membuat plugin ini ๐Ÿ‘.

kembali ke topik, saya menjalankan migrasi menggunakan perintah ini php artisanmigrate:fresh --seed. migrasi berhasil dijalankan, tetapi seeder tidak dapat berjalan dengan benar dan membuat mysql saya crash.

Kemudian saya menjalankan perintah migrasi & seed secara terpisah. anehnya perintah migrasi berjalan dengan baik. tapi tidak dengan seeder.
gambar
gambar

jadi, jalan alternatif yang saya pilih. disetel semua kunci diaktifkan ke false
kode

and it ran smoothly without any crashes.
gambar

i think, the problem is that I'm using the terminal.

My hope is that you will want to fix this.
thanks

migration error

Hi, it looks like the database tables need to be created for using this plugin - but there's no info on how to generate the migration templates. Any help? Thanks!

getLoggableAttributes() error on delete method

Good day,

I am able to process all other methods and log events such as create and update. Up until two days ago, I was able to delete as well. Now when I delete a resource I get the following error:

Z3d0X\FilamentLogger\Loggers\AbstractModelLogger::getLoggableAttributes(): Argument #2 ($values) must be of type array, null given, called in /app/vendor/z3d0x/filament-logger/src/Loggers/AbstractModelLogger.php on line 69

Custom theme colors don't work

When Filament is customized with a custom style and colors, the package doesn't account for them. That is, if my theme's color for danger is Tailwind's red, the package still accounts for the default theme color of gray or something.

I think listening to a FilamentServed event - if there is one - would help to identify if its $theme isn't null, and therefore would be injected as a style too.

Missing saved old value when update a resource

While testing the package functionalities, I noticed that the old values are missing when updating a resource. By this, I mean that in the spatie-activity log, when I update a resource, it saves the old values related to the new (changed) value. Is this feature missing from this package, or has it not been developed yet? I assume it might be a bug since this functionality is present in the base spatie activity log package.

Config customizations

First of all, thanks for this great plugin.

To use it I would need a couple of new features:

  1. ability to log models who don't have a resource
  2. ability to set another resource class

I can try to make a PR if you want (or I can fork :D)

Event auto discovery not working anymore

It looks like Event Auto Discovery no longer works when your plugin is active. At least when php artisan event:cache is executed.

shouldDiscoverEvents from the EventServiceProvider of the framework always returns false.

Maybe I should mention that I run laravel with octane.

Package not using the authentication guard setup in filament config

I have two authentication guards. The filament package is using a special admin one that uses a different table and model than the default users configured in laravel.
First thing i've noticed is that when i view an event in filament the user field is empty.

Second issue is after logging in with the regular auth guard. This package throws an error because it's trying to call some filament username function that obviously isn't defined on the regular Users model.

Here's a screenshot of the error.

CleanShot 2023-05-29 at 10 31 46@2x

For now, the quickest solution was to disable the access logger from the package config.
I can probably override the Logger and try and make it use only the admin guard but that would mean i'd have to override all the guards to properly get the username in all the other logs.

Bottom line, I think the package needs an update to read filament.auth.guard config value and apply that to all the logging.

User context not shown in filament page but saved in db

I'm getting this issue where the user (causer_id) gets set while on the filament view i get nothing
image
image

EDIT: i noticed this is because I use a custom attribute for User's name, maybe this can be added as a custom config property?

Error: Data truncated for column 'subject_id' at row 1

I have installed the package filament-logget in my fresh laravel project. Then I have installed buildix/timex package. When I create, delete or update event on timex there is error from filament-logger. You can see it in screenshot.

I have created issue about it in for buildix/timex (buildix/timex#29) but I reived answer like:

"
Hello. Thank you.
I'm not sure that it refers to timex actually.

The error occurred because filament-logger (laravel logger) is using morphs and timex is using uuid - so it has to either timex database changes upon migration not to use uuid, or logger database adjustments to

$table->nullableUuidMorphs('taggable');
"

So can you help me fix the issue?

Thanks!

image

Hero icon not found

Hi, thank you for this plugin!

I'm reporting an issue regarding the last version of the package (v0.6.0) with filament version (v3.0.30)

I'm getting Svg by name "o-clipboard-documents-list" from set "heroicons" not found. when loading the filament dashboard.

Cannot upgrade to Laravel 10

More of a FYI, upgrading to Laravel 10 introduces a dependency error

Problem 1
- Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0].
- z3d0x/filament-logger v0.4.2 requires illuminate/contracts ^8.0 | ^9.0 -> satisfiable by illuminate/contracts[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.0].
- Only one of these can be installed: illuminate/contracts[v5.4.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.0, v10.0.0], laravel/framework[v10.0.0]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it.

  • Root composer.json requires z3d0x/filament-logger ^0.4.2 -> satisfiable by z3d0x/filament-logger[v0.4.2].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.