SyntaxFix
Write A Post
Hire A Developer
Questions
From Laravel 5.6 you can use whereDate:
$users = Users::where('status_id', 'active') ->whereDate( 'created_at', '>', now()->subDays(30)) ->get();
You also have whereMonth / whereDay / whereYear / whereTime