I am currently developing an application with Laravel 5
, my main tables are users
, suppliers
, manufacturers
etc.
Each of these tables has a separate users_log
,suppliers_log
log table. The purpose of these log tables is to review operations performed for a single entity (for example: logs belonging to a particular manufacturer and the changes made in the past for that manufacturer etc.,)
I am planning to use Eloquent
and I have generated an Eloquent
model
for each of the major tables.
My Question : Should I generate separate Eloquent
models for each of the log tables or just write a method like user_log()
in the model of the major table to write my log.
P.S : Number of users going to use my application are few, therefore writing logs to a database is preferred over file logs.