add relationships to record during the creation process

I have a TagsInput::make('tags') and I want to take each of the tags and do something like $record->tags()->attach([tags])

I would need access to the created record and the data from the tags input

Where is a good place to do this?
Was this page helpful?