www.cahyonegoro.com
www.cahyonegoro.com

Reputation: 185

Show some value from data in Laravel's Blade

I'm useing Laravel's Blade to show data {{$value->blanko}} and the result is CA123456789.

how to show only CA from the data in the view?

Upvotes: 0

Views: 106

Answers (2)

Vinod VT
Vinod VT

Reputation: 7164

Try str_limit,

Eg:

{{ Str::limit($value->blanko, 2) }}

Upvotes: 2

madankundu
madankundu

Reputation: 154

Please use function like as example $result = substr($myStr, 0, 2); in controller or use laravel function str_limit

Upvotes: 1

Related Questions