Quantcast
Channel: How To Add Interval 30 Days in Laravel (MYSQL) - Stack Overflow
Viewing all articles
Browse latest Browse all 4

How To Add Interval 30 Days in Laravel (MYSQL)

$
0
0

Hi I got stack when i want to show data using interval in Laravel, I have this code and it's running well on Mysql and showing what i want. but how to implement the mysql code to laravel ?

this is mySql code

SELECT * FROM projects WHERE end_date BETWEEN CURRENT_DATE() AND DATE_ADD(CURRENT_DATE(), INTERVAL 30 DAY)

and i have trying some ways on Laravel Controller but array is null

$highlightProject = project::select('*')->where(DB::raw('end_date BETWEEN CURRENT_DATE() AND DATE_ADD(CURRENT_DATE(), INTERVAL 30 DAY)'))->get();    dd($highlightProject);

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>