app/Http/Controllers/TestProjectController.php
/**
	 * Remove the specified resource from storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
Remove the specified resource from storage.
@param  int  $id
@return Response
Remove the specified resource from storage . @param int $id @return Response
public function destroy($id)
	{
		$item = \App\TestProject::find($id);
		if($item){
        	$del_obj = new DeleteQueryHandler();
        	$del_res = $del_obj->deleteFunctionalityByProjectId($id);
			if($del_res == 0)
			{
				$message = $this->getMessage('messages.delete_failed');
				Toast::message($message, 'danger');
			}  else{      	
	        	$item->delete();
				$message = $this->getMessage('messages.delete_success');
				Toast::success($message);
			}
        }
		else{
			$message = $this->getMessage('messages.delete_failed');
			Toast::message($message, 'danger');
		}
		return redirect()->route('profile');
	}
public function destroy ( $ id ) { $ item = \ App \ TestProject :: find ( $ id ) ; if ( $ item ) { $ del_obj = new DeleteQueryHandler ( ) ; $ del_res = $ del_obj -> deleteFunctionalityByProjectId ( $ id ) ; if ( $ del_res == 0 ) { $ message = $ this -> getMessage ( 'messages.delete_failed' ) ; Toast :: message ( $ message , 'danger' ) ; } else { $ item -> delete ( ) ; $ message = $ this -> getMessage ( 'messages.delete_success' ) ; Toast :: success ( $ message ) ; } } else { $ message = $ this -> getMessage ( 'messages.delete_failed' ) ; Toast :: message ( $ message , 'danger' ) ; } return redirect ( ) -> route ( 'profile' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .
//Delete testcase