|
|
@ -6,11 +6,10 @@ use Illuminate\Http\Request; |
|
|
|
use App\Models\VersionGantt; |
|
|
|
use App\Models\VersionGantt; |
|
|
|
|
|
|
|
|
|
|
|
class VersionGanttController extends Controller |
|
|
|
class VersionGanttController extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
public function add(Request $request){ |
|
|
|
public function add(Request $request){ |
|
|
|
$this->validate($request, [ |
|
|
|
$this->validate($request, [ |
|
|
|
'name_version' => 'required', |
|
|
|
'name_version' => 'required', |
|
|
|
'description' => 'required', |
|
|
|
|
|
|
|
'proyek_id' => 'required' |
|
|
|
'proyek_id' => 'required' |
|
|
|
]); |
|
|
|
]); |
|
|
|
$data = $request->all(); |
|
|
|
$data = $request->all(); |
|
|
@ -36,7 +35,7 @@ class VersionGanttController extends Controller |
|
|
|
return response()->json(['status'=>'failed','message'=>'data version gantt Project not found!','code'=>400], 400); |
|
|
|
return response()->json(['status'=>'failed','message'=>'data version gantt Project not found!','code'=>400], 400); |
|
|
|
die(); |
|
|
|
die(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if($result){ |
|
|
|
if($result){ |
|
|
|
return response()->json(['status'=>'success','message'=>'version gantt Project successfully updated!','code'=>200], 200); |
|
|
|
return response()->json(['status'=>'success','message'=>'version gantt Project successfully updated!','code'=>200], 200); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
@ -54,7 +53,7 @@ class VersionGanttController extends Controller |
|
|
|
return response()->json(['status'=>'failed','message'=>'data version gantt Project not found!','code'=>400], 400); |
|
|
|
return response()->json(['status'=>'failed','message'=>'data version gantt Project not found!','code'=>400], 400); |
|
|
|
die(); |
|
|
|
die(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($delete){ |
|
|
|
if($delete){ |
|
|
|
return response()->json(['status'=>'success','message'=>'version gantt Project successfully deleted!','code'=>200], 200); |
|
|
|
return response()->json(['status'=>'success','message'=>'version gantt Project successfully deleted!','code'=>200], 200); |
|
|
|