/** * @param Request $request * @param int $id */ public function reorder(Request $request, $id) { $list = PostList::findOrFail($id); $list->reorder($request->get('post_id'), $request->get('order')); }
/** * @param PostListDestroyRequest $request * @param int $id * @return \Illuminate\Http\RedirectResponse */ public function destroy(PostListDestroyRequest $request, $id) { $postList = PostList::findOrFail($id); $postList->delete(); return redirect()->route('admin::post-lists.index'); }
/** * Remove the specified postList from storage. * * @param int $id * @return \Dingo\Api\Http\Response */ public function destroy($id) { $postList = $this->postList->findOrFail($id); $postList->delete(); return $this->response->item($postList, new PostListTransformer()); }