Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[5.2] Allow the detach method to accept a collection#14412

Merged
taylorotwell merged 1 commit into
laravel:5.2from
arjasco:allow_collection_on_detach
Jul 21, 2016
Merged

[5.2] Allow the detach method to accept a collection#14412
taylorotwell merged 1 commit into
laravel:5.2from
arjasco:allow_collection_on_detach

Conversation

@arjasco
Copy link
Copy Markdown
Contributor

@arjasco arjasco commented Jul 21, 2016

As the title says!

@GrahamCampbell GrahamCampbell changed the title Allow the detach method to accept a collection [5.2] Allow the detach method to accept a collection Jul 21, 2016
@GrahamCampbell
Copy link
Copy Markdown
Collaborator

The fact you changed the method signature (event just the phpdoc) means this is probably better targeted at L5.3.

{
if ($ids instanceof Model) {
$ids = (array) $ids->getKey();
$ids = $ids->getKey();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this no longer an array?

@arjasco
Copy link
Copy Markdown
Contributor Author

arjasco commented Jul 21, 2016

This behaviour already exists for attach. The id var isn't been casted 3 times either haha. Can go for 5.3 if you really think so. Cherry pick this commit and submit pull request again?

@taylorotwell taylorotwell merged commit 9d853b9 into laravel:5.2 Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants