コード例 #1
0
 /**
  * Deactivate the requested submission.
  *
  * @return Response
  */
 public function deactivateSubmission($submission_id)
 {
     try {
         if (Submission::deactivate($submission_id)) {
             Session::flash('alert_success', 'Submission successfully deactivated.');
             return $this->handleResponse(['message' => 'Submission successfully deactivated.']);
         } else {
             return $this->handleRideShareLogError($e, 'Failed to deactivate Submission.');
         }
     } catch (\Exception $e) {
         return $this->handleRideShareLogError($e, 'Failed to deactivate Submission.');
     }
 }
コード例 #2
0
 /**
  * Remove the specified submission from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         Submission::deactivate($id);
     } catch (\Exception $e) {
         return $this->handleError($e);
     }
     return Redirect::route('submissions.index');
 }