TIP 93 / 100

Compare the Values of Two Columns.

You can use whereColumn method to compare the values of two columns.

code
return Task::whereColumn('created_at', 'updated_at')->get();
// pass a comparison operator
return Task::whereColumn('created_at', '>', 'updated_at')->get();