|
|
@ -181,9 +181,9 @@ class ProjectController extends Controller |
|
|
|
$data = Project::find($id); |
|
|
|
$data = Project::find($id); |
|
|
|
$dateNow = Carbon::now(); |
|
|
|
$dateNow = Carbon::now(); |
|
|
|
if ($data) { |
|
|
|
if ($data) { |
|
|
|
// $this->deleteRelative($id, $company_id); |
|
|
|
$this->deleteRelative($id, $company_id); |
|
|
|
// if ($data->delete()) { |
|
|
|
if ($data->delete()) { |
|
|
|
if ($data->update(['deleted_at' => $dateNow, 'deleted_by_id' => $this->currentId])) { |
|
|
|
// if ($data->update(['deleted_at' => $dateNow, 'deleted_by_id' => $this->currentId])) { |
|
|
|
DB::commit(); |
|
|
|
DB::commit(); |
|
|
|
return response()->json(['status' => 'success', 'message' => 'Data deleted!', 'code' => 200], 200); |
|
|
|
return response()->json(['status' => 'success', 'message' => 'Data deleted!', 'code' => 200], 200); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|