Laravel 5 > touch pivot table (Many-to-Many) -


why updated_at field in pivot table not updating giving following setup?

model

class conversation extends model {      public function users()     {        return $this->belongstomany('app\user')->withtimestamps();     } } 

controller

$conversation = conversation::find($id); $conversation->users()->touch(); 

the last line should - far understand whole thing - update pivots table updated_at field, shouldn´t it?

but isn´t. right have manualy via db query.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -