예제 #1
0
 /**
  * Reorder sections by theirid.
  *
  * @param $sections
  * @return mixed
  */
 public function reorderSections($sections)
 {
     foreach ($sections as $key => $section) {
         $section = Section::findOrFail($section)->update(['order' => $key]);
     }
     return 'success';
 }