Welcome Guest, Not a member yet? Register   Sign In
How to get data after saving the model
#1

Run
PHP Code:
$userModel->save($data); 

Now I want to get all the fields and values of the record of this model that was saved/updated.
Query the database again?

PHP Code:
$lastInsertId $userModel->getLastInsertID();

$user $userModel->where('id'$lastInsertId)->first(); 
Reply


Messages In This Thread
How to get data after saving the model - by Seva - 01-27-2022, 01:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB