Exemplo n.º 1
0
 /**
  * restores a topic, along with its posts and views, to a section
  */
 public static function restoreTopicToSection(\Nexus\Topic $topic, \Nexus\Section $section)
 {
     $topic->posts()->restore();
     $topic->views()->restore();
     $topic->restore();
     $topic->section_id = $section->id;
     $topic->save();
 }