在Laravel视图中调用未定义的函数
I have a About Us
portion in my Laravel website home page. I have uploaded a huge article for About Us
from admin panel which is shown in about us
page. But I want to show a specific number of word for about us
in home page and add read more
after that. while click on read more
it goes to about us
page.
But I can't show specific number of words from that article in my home page.
I have use echo word_teaser_end($about_us[0]->details, 10);
function but it gives error
Call to undefined function word_teaser_end() (View: E:\xampp\htdocs\OFFICE\SEN_CARE\sencare.com.bdesources\views\frontend\home\home.blade.php)
What should I do now ?
我的Laravel网站主页上有 但我无法显示该文章的具体数量 在我的主页。 p>
我使用 我现在该怎么办? p>
div> About Us code>部分。 我已经从管理面板上载了一篇关于
关于我们 code>的大文章,该文章显示在
about us code>页面中。 但是我想在主页中为
关于我们 code>显示一个特定数量的单词,然后添加
read more code>。 点击
阅读更多 code>,然后转到
about us code>页面。 p>
echo word_teaser_end($ about_us [0] - > details,10); code>函数但是它给出了错误 p >
调用未定义的函数word_teaser_end()(查看:E:\ xampp \ htdocs \ OFFICE \ SEN_CARE \ sencare.com.bd
esources \ views \ frontend \ home \ home.blade。 php) code> p>
I don't know about the word_teaser_end()
as it's define function,
Try str_limit()
helper function which can help you to load the number of words from string
{{ str_limit($string,'10') }}