/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($event, $id) { $api = new \App\Helpers\ApiHelper(); $url = 'events/' . $event . '/photos/' . $id; if (\Auth::check()) { $url .= '?auth_user_id=' . \Auth::user()->id; } $photos = $api->destroy($url, ''); if ($photos['success'] === true) { return \Redirect::back()->with('success_message', 'Image successfully deleted! '); } else { return \Redirect::back()->with('success_message', 'Image not found, must be deleted! '); } }