在我的laravel项目中,我有一个名为description(datatype:Text)的数据库列 .
我想从中取出仅2行文本.
我怎样才能在laravel中实现这一目标.
我需要借助正则表达式吗?
<p>{!! $article->articleDescription !!} </p><br>
Run Code Online (Sandbox Code Playgroud)
这就是我的文本在数据库中的样子.
<h2>What is Lorem Ipsum?</h2>
<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the …Run Code Online (Sandbox Code Playgroud)