HOW to RETURN the attached object created?
return user()->providerConnections()->attach( $provider );
this code creates a new record on the database, but I can't return the object and I need it to know the actual ID created with this attachment, therefore make another action...
thanks in advance
GET THIS ERROR
Trying to get property 'pivot' of non-object