コード例 #1
0
 public function destroy(Documentable $documentable)
 {
     if (is_integer($documentable)) {
         $documentable = Documentable::find($documentable);
     }
     $documentable->delete();
     Flash::success('Documentable has been created Deleted!');
     return Redirect::back();
 }
コード例 #2
0
 public function destroy($documentable)
 {
     $documentable = Documentable::find($documentable);
     $documentable->delete();
     return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']);
 }