@@ -199,7 +199,7 @@ class ProjectController extends Controller
$project = Project::findOrFail($id);
$project->fill($request->only([
- 'begin', 'end', 'available_days'
+ 'begin', 'end'
]));
$project->save();
@@ -30,7 +30,7 @@ class ProjectDetailResource extends JsonResource
'const' => $this->const,
'begin' => $this->begin,
'end' => $this->end,
- 'available_days' => $this->available_days,
+ //'available_days' => $this->available_days,
'latitude' => $this->latitude,
'longitude' => $this->longitude,
'type' => $this->type,
@@ -13,7 +13,7 @@ class Project extends Model
use HasFactory, Filterable,SoftDeletes;
protected $fillable = [
- "name","code","const","available_days","status","begin","end","latitude","longitude","type","acl","whitelist","description"
+ "name","code","const","status","begin","end","latitude","longitude","type","acl","whitelist","description"
];
protected static function booted(): void
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('projects', function (Blueprint $table) {
+ //
+ $table->dropColumn(['available_days']);
+ });
+ }
+ * Reverse the migrations.
+ public function down(): void
+ $table->integer('available_days')->default(0);
+};