beginner_luck
1819
3
Vue

Laravel to VueJs limit characters to show

Posted 1 year ago by beginner_luck

Can someone help me, I have a blog and in my post.body I want to only show 300 characters and add Read More on it, in Vuejs. I have a working code but it seems that it will not work in VueJs, can someone help me on this? This is my code

{{ substr(strip_tags(post.body), 0, 300) }}{{ strlen(strip_tags(post.body)) > 300 ? "..." : "" }}

Please sign in or create an account to participate in this conversation.