コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($this->repository->find($id)->delete()) {
         return ["success" => true];
     }
     return ["success" => false];
 }
コード例 #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     return $this->repository->find($id);
 }