Skip to content

Conversation

@vahidRP
Copy link

@vahidRP vahidRP commented Sep 3, 2019

I improved DuplicateController by adding a switch on different relations and handled almost all relations.

switch(get_class($relation_data)){
case BelongsToMany::class:
case MorphToMany::class:
foreach ($items as $item) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to extract these to individual functions to clean up this, when all classes are added it could become hard to read/manage.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you wish. I think you can merge this changes to this currently version of your repository.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, I'll give it a test and double-check

@jackabox jackabox added the enhancement New feature or request label Sep 3, 2019
@jackabox jackabox added this to the Version 1 milestone Sep 3, 2019
Copy link

@mide22 mide22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants