Skip to content
Advertisement

which is better for user activity in laravel database or log file [closed]

hi im thinking about user activity in laravel application .. and i thought is it better to keep user activity in saparated log file than keep it in database .. like create folder in storage folder for every user .. and create log file with date like this ..

user_id_YYY-mm-dd.log

is that better thank keep logs in database

Advertisement

Answer

Logs on Laravel works really well to debug, but to get an history from user activity save data in database always is the best option.

You can create a log table and indexing with user_id and create reports from user activity.

querying by date, action or any other field.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement