Exemple #1
0
 /**
  * @return \Illuminate\Routing\Route|null|string
  */
 public function ingnoreId()
 {
     $id = $this->route('critical');
     $parameter = $this->input('measure_id');
     return Critical::where(compact('id', 'parameter'))->exists() ? $id : '';
 }
 /**
  * Remove the specified resource from storage (soft delete).
  *
  * @param  int  $id
  * @return Response
  */
 public function delete($id)
 {
     //Soft delete the critical
     $critical = Critical::find($id);
     /*$testCategoryInUse = TestType::where('test_category_id', '=', $id)->first();
     		if (empty($testCategoryInUse)) {
     		    // The test category is not in use
     			$testcategory->delete();
     		} else {
     		    // The test category is in use
     		    $url = session('SOURCE_URL');
                 
                 return redirect()->to($url)
     		    	->with('message', trans('messages.failure-test-category-in-use'));
     		}*/
     // redirect
     $url = session('SOURCE_URL');
     return redirect()->to($url)->with('message', trans('messages.record-successfully-deleted'));
 }