I use migration tables for both new tables and new data inserts based on its 'revision' based system.
I have read you can use the disable logging feature however this is cumbersome when it appears on 100 different files and will appear in future files, I am proposing a change where data cannot be logged if it is running in console (config), or having a configuration for a different 'log type' to weed this out when displaying back the activity log of all users.
But console are also other artisan commands that could add/change data. Like a user:create command.
So a general disable in console isn't cool.^^
I would recommend you to create a trait or abstract class with a setup/before and teardown/after method that handles the log dis/enable logic and you are fine.
I thought this was to show user activity?
Console isn't a user.
I'm inserting standard DB setup data with migrations/seeding, stuff that does not need to be logged (inserting settings into database etc).
I already made a copy of the trait and edited the CanLogFunction, personally I have it working fine now just suggesting the simple option.
I'm suggesting an option not a general disable.
Thanks for your suggestion. I think the vast majority of users doesn't need this option and I'd like to keep this package as simple as possible.
It depends on your app - even on console you can have an user. Imagine MySQL CLI or other tools like this.
And on the other hand this also creates some kind of change log for a model.
Most helpful comment
Thanks for your suggestion. I think the vast majority of users doesn't need this option and I'd like to keep this package as simple as possible.