Skip to content
Advertisement

Call to undefined function str_limit()

Call to undefined function str_limit() laravel 6x this my code , help me

<dt>Description</dt>
<dd style="word-break: break-all;"> {{ str_limit($product ?? '',500,' ...') }}</dd>

Advertisement

Answer

If you are using laravel 5.4 upwards

Please use this like

{{ IlluminateSupportStr::limit($product ?? '',500,' ...') }}

See Laravel Tutorial for more info.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement