Support the ongoing development of Laravel.io →
Database Eloquent Installation

So I have a query that looks like

$atten = Attendance::select(  DB::raw('DATE(tStamp)')  )->groupBy( DB::raw('DATE(tStamp)') )->get() ;

    	
    	foreach ($atten as $d)
    	{
    		 
    		return $d ;


     	}

And the return value looks like {"DATE(tStamp)":"2016-08-23"}

I can't seem to get the value like I would using $d->DATE(tStamp)
Which is weird looking and wrong.

I think my query needs help or how can I get my date out of the object? thanks,

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

johnfold johnfold Joined 17 Sep 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.