Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get last 30 days records in laravel

use CarbonCarbon;

$users = DB::table("users")
    ->select('id')
    ->where('accounttype', 'standard')
    ->where('created_at', '>', now()->subDays(30)->endOfDay())
    ->all();
 
PREVIOUS NEXT
Tagged: #days #records #laravel
ADD COMMENT
Topic
Name
8+8 =