Browse Source

created delete method in deleteRelative method

pull/3/head
wahyuun 1 year ago
parent
commit
9e093bba04
  1. 42
      app/Http/Controllers/ProjectController.php

42
app/Http/Controllers/ProjectController.php

@ -2,35 +2,38 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Link;
use App\Models\User;
use App\Models\Image;
use App\Models\Holiday;
use App\Models\Project;
use App\Models\UserToProyek;
use App\Models\Activity;
use App\Models\UserToActivity;
use App\Models\User;
use App\Jobs\ProcessSCurve;
use App\Models\OfficeHours;
use App\Models\ProjectType;
use App\Models\ProjectPhase;
use App\Models\UserToProyek;
use App\Models\VersionGantt;
use Illuminate\Http\Request;
use App\Models\ProjectIssues;
use App\Models\AssignMaterial;
use App\Models\DokumenProject;
use App\Models\FolderDocumentProyek;
use App\Models\ProjectCharter;
use App\Models\ProjectApproval;
use App\Models\ProjectPhase;
use App\Models\ProjectType;
use App\Models\ProjectMileStone;
use App\Models\ProjectParticipants;
use App\Models\ReportActivity;
use App\Models\ShowHideColumn;
use App\Models\VersionGantt;
use App\Models\Image;
use App\Models\CommentActivity;
use App\Models\Link;
use App\Models\UserToActivity;
use App\Models\ActivityDokumen;
use App\Models\Holiday;
use App\Models\ReportActivity;
use App\Models\OfficeHours;
use App\Models\CommentActivity;
use App\Models\ProjectApproval;
use App\Models\ProjectMileStone;
use App\Models\ProjectChecklists;
use Illuminate\Support\Facades\DB;
use App\Models\ProjectParticipants;
use App\Models\FolderDocumentProyek;
use App\Helpers\MasterFunctionsHelper;
use App\Models\ProjectRisks;
use App\Models\ReportActivityMaterial;
use Illuminate\Support\Facades\Artisan;
use App\Jobs\ProcessSCurve;
const API_GEOLOCATION = "https://nominatim.oslogdev.com/search/ADDR?format=json&addressdetails=1&limit=1";
@ -156,6 +159,9 @@ class ProjectController extends Controller
ProjectApproval::where('proyek_id', $project_id)->delete();
ProjectMileStone::where('proyek_id', $project_id)->delete();
ProjectParticipants::where('proyek_id', $project_id)->delete();
ProjectChecklists::where('proyek_id', $project_id)->delete();
ProjectIssues::where('proyek_id', $project_id)->delete();
ProjectRisks::where('proyek_id', $project_id)->delete();
$this->deleteVersionGantt($project_id);
$this->deleteDokumenProject($project_id);
}

Loading…
Cancel
Save