コード例 #1
0
 /**
  * @param Page $page
  * @param Request $request
  * @return $this
  */
 protected function updatePageOrder(Page $page, Request $request)
 {
     if ($request->has('order', 'orderPage')) {
         try {
             $page->updateOrder($request->input('order'), $request->input('orderPage'));
         } catch (MoveNotPossibleException $e) {
             return redirect(route('backend.pages.edit', $page->id))->withInput()->withErrors(['error' => 'Cannot make a page a child of itself.']);
         }
     }
 }