How to Spatie Activity Log Customize?

how to Spatie Activity Log customize I want show all recorde for admin just and another user can show all records logs without admin's records
6 Replies
krekas
krekas13mo ago
Not filament related question. Check packages docs
Dennis Koch
Dennis Koch13mo ago
If you want to show them on a ListPage you need to set the query to use a where on the column that holds the created by data. But you provide no example of what you are trying/tried so it’s hard to help
Alnuaimi
AlnuaimiOP13mo ago
Spatie Activity Log is plugin how to customize on it . example select all records from table Activity_Log if User is admin but it is'nt admin show all records without admin's record @Dennis Koch
Dennis Koch
Dennis Koch13mo ago
It doesn't help if you just repeat the same info. Yes, Spatie Activity Log is a plugin. But on it's own there is no relation to Filament.
example select all records from table Activity_Log if User is admin but it is'nt admin show all records without admin's record
This is just a Laravel Eloquent question. Use where() to filter your query:
->where('causer_type',User::class)
->where('causer_id', $admin->id)
->where('causer_type',User::class)
->where('causer_id', $admin->id)
Alnuaimi
AlnuaimiOP13mo ago
where Can I write this code ?
Dennis Koch
Dennis Koch13mo ago
Whereever you use your the activities. As I said: You don't provide much information to help you
Want results from more Discord servers?
Add your server