According to this discussion in Laracasts, the str_slug is only language supported for few three languages (en, de, and bg).
That is, if the language of discussion title is not supported, one will get some unexpected error (such as #199).
From here I replace str_slug with str_random to solve the problem. Also I check existence so as to avoid slug conflict.
According to this discussion in Laracasts, the
str_slug
is only language supported for few three languages (en
,de
, andbg
). That is, if the language of discussion title is not supported, one will get some unexpected error (such as #199). From here I replacestr_slug
withstr_random
to solve the problem. Also I check existence so as to avoid slug conflict.