ideas to store record activity logs?

Posted 1 year ago by w1n78

i need to store data whenever a record is created, updated, deleted. my migration file is as follows

Schema::create('record_logs', function (Blueprint $table) {
            $table->string('record_action', 50)
                ->comment('created, updated, deleted')
            $table->string('environment', 50)

no constraints or cascade actions needed. it just creates records in this table. i may need to query the table and display records that belong to the data being tracked. i'm using mysql database for the project and currently using the same db to store this log table.

should i store it in the same database? keep it in mysql but different database? use sqlite? use redis? i'd love to hear how some of you have this implemented. thanks.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.