'integer', // If prep_data is JSON in DB, use 'array' (or 'json') cast: 'prep_data' => 'array', ]; // Optional relationship public function classSection() { return $this->belongsTo(ClassSection::class, 'class_section_id'); } }