Proper method for modifying a stream's field type configuration
Created 1 year ago by emergingdzns

I've got a stream and I defined one of the fields as a multiple field type with a relationship that was just plain dumb. I realized the error of my ways, but now I'm perplexed as to how to now create a migration that will modify the field type to point to the correct relationship. Can someone shed some light?

ryanthompson  —  1 year ago Best Answer

You can use normal migrations along the lines of this:

$this->fields()->findBySlugAndNamespace('foo', 'bar')->setAttribute('config', $newConfig)->save();