Пример #1
0
 public function destroy(Userable $userable)
 {
     if (is_integer($userable)) {
         $userable = Userable::find($userable);
     }
     $userable->delete();
     Flash::success('Userable has been created Deleted!');
     return Redirect::back();
 }
 public function destroy($userable)
 {
     $userable = Userable::find($userable);
     $userable->delete();
     return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']);
 }