laravel字符截断

使用函数str_limit(),第一个参数是要截断的值,第二个参数是长度,第三个参数是超出部分用什么替代

str_limit("$posts",'100','...);

原文地址:https://www.cnblogs.com/hanmengya/p/10857844.html