Simple HTML problem

Posted 10 months ago by finchy70

Trying to output the following on one line but it always renders with the ...read more. on a separate line instead of appending the shortened post. Any ideas?

<div>
     <span class="font-italic">{!! $post->body !!}<a class="read-more" href="/posts/show/{{$post->id}}">{{ (strlen($post->body)>99?"... read more.":"")}}</a></span>
</div>```

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.