Jhonny Silva Tue May 21 12:28:25 -0400 2013

Subject: Last inserted id

Retrieve the insert id of the last model saved ???
someone give me a ready example?

Megan McVey Thu Jul 18 18:20:57 -0400 2013

If you just want the id of the thing you just saved...

$thing = new Thing();
$thing->field = 'value';
if ($thing->save()) {
echo $thing->id;

should do it. (Assuming id is your primary key)