MySQL enum removing backslashes MySQL enum removing backslashes laravel laravel

MySQL enum removing backslashes


I had the same trouble with MySQL enums.

Laravel 5.3 adds a morphMap feature to allow you to set custom strings (without slashes) to use in place of the namespaced classes. Prior to 5.3 there was a morphClass property that could be set on a model.

https://laravel.com/docs/5.3/eloquent-relationships#polymorphic-relations