Wednesday, 3 May 2023

Compare the value of two db table column in laravel

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

  

return Task::whereColumn('created_at', 'updated_at')->get();


// pass a comparison operator

return Task::whereColumn('created_at', '>', 'updated_at')->get();

No comments:

Post a Comment

Other post

1) The create() Method The  create()  method is a powerful and convenient way to store data in your Laravel application. It is typically use...