<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智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ``` // 獲取所有數據 $students=Student::all(); dd($students); // 查找滿足主鍵條件的單條記錄 $student=Student::find(5); dd($student); // 根據主鍵查找,找不到則報錯 $student=Student::findOrFail(105); dd($student); $student=Student::where('id','>','2') ->orderBy('age','desc') ->first(); dd($student); echo '<pre>'; $student=Student::chunk(2,function($student){ var_dump($student->toArray()); }); // 聚合函數 $count=Student::count(); dd($count); $max=Student::where('id','>',2)->max('age'); dd($max); ``` ***** ``` // 使用模型新增數據 $student=new Student(); $student->name='wangWu2'; $student->age=20; $bool=$student->save(); dd($bool); $student=Student::find(10); echo $student->created_at; // 使用模型的create方法新增數據 $student=Student::create([ 'name'=>'zhaoSi11','age'=>16 ]); dd($student); // 以屬性查找用戶,如沒有則新增 $student=Student::firstOrCreate([ 'name'=>'zhaosi55' ]); dd($student); // 以屬性查找用記,如沒有則創建記錄,但不新增入庫,如需要入庫,則需save()方法 $student=Student::firstOrNew([ 'name'=>'劉死魚1', ]); $student->save(); dd($student); ``` ***** ``` // 通過模型更新數據 $student=Student::find(16); $student->name='kitty1444'; $bool=$student->save(); dd($bool); $student=Student::where('id','=',15)->update([ 'age'=>55 ]); dd($student); ``` ***** ``` // 通過模型刪除 $student=Student::find('12'); $bool=$student->delete(); dd($bool); // 通過主鍵刪除 $student=Student::destroy([9,10]); dd($student); // 刪除指定條件的數據 $nums=Student::where('id','>',14)->delete(); dd($nums); ```
                  <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>

                              哎呀哎呀视频在线观看