0

Im trying to query a table with column called completed and column called follow_ups among other columns - using laravel im trying to

 select * from table where completed > follow_ups 
 select * from table where completed = follow_ups

using laravel model im running the following

 $followUps = TestFollowups::where('follow_ups', '>', 'completed')->get();

I dont have to use laravels model system i can write a manual query as well but unsure what the query should look like. Can anyone help please

Sam
  • 2,856
  • 3
  • 18
  • 29
Yeak
  • 2,470
  • 9
  • 45
  • 71

1 Answers1

0

You can use:

whereRaw(select * from table where completed > follow_ups)
ekhumoro
  • 115,249
  • 20
  • 229
  • 336