Example #1
0
 /**
  * @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'));
 }
Example #2
0
 /**
  * @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');
 }
Example #3
0
 /**
  * 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());
 }