Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JordanXIV's avatar

Is {{str_limit($text, 100)}} still working in Laravel 6.0 ?

I've got an error "Call to undefined function str_limit()".

0 likes
5 replies
COTIGA's avatar

Or

use Illuminate\Support\Str;

Str::limit($text, 100)

For example, also for replace str_slug by Str::slug

taufiqnet's avatar

{{ substr(strip_tags($text->column_name), 0, 100) }}

It will work fine.

3 likes

Please or to participate in this conversation.