<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 微博數據流 上一節中,我們雖然創建了發布微博的功能,可是發布之后并不能實時的看到自己發布的內容,也無法在首頁看到大家發布的內容,所以本節將會在首頁添加微博動態的功能。 ## 讀取微博表 要獲取整個微博的內容,非常簡單的,我們只需要讀取微博表并倒序即可。 `application\welcome\controller\Index.php` ~~~php <?php namespace app\welcome\controller; use think\Controller; use app\User\model\Post; class Index extends Controller { public function home() { $this->assign([ 'posts' => Post::with('user')->order('created_at', 'desc')->paginate(20) ]); return $this->fetch(); } ... } ~~~ 編輯前端頁面 `resources\views\welcome\index\home.blade.php` ~~~html ... <div> <div class="list-group list-group-flush"> @foreach ($posts as $post) <div class="list-group-item"> <div> {{ $post->user->name }} -- {{ $post->created_at }} </div> <div> {{ $post->content }} </div> </div> @endforeach </div> {!! $posts !!} </div> @stop ... ~~~ 再次訪問首頁,即可看到所有微博已經呈現出來。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看