diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 7478494..48cb86e 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -329,15 +329,18 @@ class ProjectController extends Controller } public function sCurveCommand(Request $request){ - $project = Project::find($request->project_id); + Artisan::call('calculate:scurve', [ + 'project_id' => $request->project_id + ]); + // $project = Project::find($request->project_id); - if ($project) { - dispatch(new ProcessSCurve($project)); + // if ($project) { + // dispatch(new ProcessSCurve($project)); - return response()->json(['message' => 'S Curve calculation queued']); - } + // return response()->json(['message' => 'S Curve calculation queued']); + // } - return response()->json(['message' => 'Project not found'], 404); + // return response()->json(['message' => 'Project not found'], 404); } public function getLinearSCurve(Request $request){