I return an array of results in which I need to put every value into separate field in my database using Symfony Doctrine.
array:4 [
"access_token" => "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9."
"token_type" => "bearer"
"expires_in" => "2592000"
"refresh_token" => "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
]
So I started like this to pull out my results but I can assign them like separate fields that I need for storing value into 'access_token, 'token_type' field etc..
$newUser = new User();
$newUser->setAccess($keys['access_token']);
$newUser->setRefresh($keys['refresh_token']);
Comments
Post a Comment