Skip to content

[5.3] Allow numeric keys in morphMap#15332

Merged
taylorotwell merged 1 commit into
laravel:5.3from
themsaid:morphmap
Sep 8, 2016
Merged

[5.3] Allow numeric keys in morphMap#15332
taylorotwell merged 1 commit into
laravel:5.3from
themsaid:morphmap

Conversation

@themsaid

@themsaid themsaid commented Sep 8, 2016

Copy link
Copy Markdown
Member

This gives the ability to save numeric keys in the database and then map it with the class names.

Relation::morphMap([
    1 => 'App\Post',
    2 => 'App\Audio'
]);

Check #12845 for reference.

@taylorotwell taylorotwell merged commit bb7a505 into laravel:5.3 Sep 8, 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.

2 participants