Browse Source

type gantt

pull/3/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
72fcd472ac
  1. 7
      app/Http/Controllers/VersionGanttController.php
  2. 10
      app/Models/VersionGantt.php

7
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);

10
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'
];
}

Loading…
Cancel
Save