(Laravel)使用 - > first()时,相关模型查询返回数组而不是对象

Hello, my question is: How can i get an object instead of an array?

for example: when i perform a query like

$checkIn = Check_in::whereHas('user', function($q) use ($user){
   $q->where('id', $user->id); 
})->whereBetween('created_at', array($timetable->entry->startOfDay(), $timetable->entry->endOfDay()))->first();

after that i should be able to do a

echo $checkIn->created_at;

but when i do it i get an errorException

ErrorException
Trying to get property of non-object (View: C:\xampp\htdocs\*\app\views\*\*.blade.php)

but it works when i do a

echo $checkIn['created_at'];

this is annoying, because as an array, i can't use Carbon functions on the dates.

PS: i'm using Laravel 4.1