2016-06-18 36 views
0

我想修改我的客戶端的expires_at,當我堅持($客戶端)和flush();除setExpiresAt()外,每個方法都可以正常工作,但它不會更改表中的值。 (*)此方法不存在於Class User或其創建的FOSUserBundle中。(*)此方法不存在於Class User或其創建的FOSUserBundle中。你可以看到它here

+0

什麼是$ durationcontract? –

+0

客戶的合同期限可以是6個月或1年 –

+0

所以,它是「+6個月」還是「+1年」? –

回答

0

也許主義沒有看到對象之間的區別。

所以,試試這個:

$expiresat = $client->getExpiresAt(); 
$expiresat = clone $expiresat; 
$expiresat->modify($durationcontract); 
$client->setExpiresAt($expiresat); 
相關問題