spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

只有在save 的时候才能在数据库中查看到日志 #50

Closed liucg1995 closed 7 years ago

liucg1995 commented 7 years ago

当使用insert,update 进行数据操作的时候,不能在数据库查看到日志,只有在save操作的时候,才能在数据库看到日志。如何才能使用 insert update 时,也能在数据库查看到日志

freekmurze commented 7 years ago

I'm sorry, but I don't speak your language. Could you try asking your question in English?

liucg1995 commented 7 years ago

When using insert, update for data manipulation, can not be viewed in the database log, only in the save operation, in order to see the database log. How to use insert update, you can also view the database log

freekmurze commented 7 years ago

Here are same examples on how to log model events: https://docs.spatie.be/laravel-activitylog/v1/advanced-usage/logging-model-events

If there's something not working on your end, please post some code snippets that enables me to recreate the problem.