diff --git a/app/Http/Controllers/VersionGanttController.php b/app/Http/Controllers/VersionGanttController.php index 9406237..dbd7a6a 100644 --- a/app/Http/Controllers/VersionGanttController.php +++ b/app/Http/Controllers/VersionGanttController.php @@ -6,11 +6,10 @@ use Illuminate\Http\Request; use App\Models\VersionGantt; class VersionGanttController extends Controller -{ +{ public function add(Request $request){ $this->validate($request, [ 'name_version' => 'required', - 'description' => 'required', 'proyek_id' => 'required' ]); $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); die(); } - + if($result){ return response()->json(['status'=>'success','message'=>'version gantt Project successfully updated!','code'=>200], 200); }else{ @@ -54,7 +53,7 @@ class VersionGanttController extends Controller return response()->json(['status'=>'failed','message'=>'data version gantt Project not found!','code'=>400], 400); die(); } - + if($delete){ return response()->json(['status'=>'success','message'=>'version gantt Project successfully deleted!','code'=>200], 200); diff --git a/app/Models/VersionGantt.php b/app/Models/VersionGantt.php index 0cea0b5..1cf1787 100644 --- a/app/Models/VersionGantt.php +++ b/app/Models/VersionGantt.php @@ -12,14 +12,16 @@ class VersionGantt extends Model const UPDATED_AT = 'updated_at'; protected $fillable = [ - 'name_version', + 'name_version', 'description', 'date_base_line', 'proyek_id', 'config_dayoff', - 'created_at', - 'created_by', - 'updated_at', + 'auto_schedule', + 'calculation_type', + 'created_at', + 'created_by', + 'updated_at', 'updated_by' ]; }