第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

$request 根據(jù)我轉(zhuǎn)儲它的位置返回不同的值

$request 根據(jù)我轉(zhuǎn)儲它的位置返回不同的值

PHP
繁星點點滴滴 2021-06-30 17:10:23
在 my 中ReportController.php,我的函數(shù)接收Request $request,如下所示:class ReportController extends Controller{    public function store(Request $request)    {         \Log::info("Request content:");         \Log::info($request);         error_log("request:");         error_log($request);         $insertID = Report::create([                    'action' => $request->action,                    'reportID' => $request->reportID,                    'incidentDate' => $request->incidentDate,                    'who' => $request->who,                    'location' => $request->location,                    'description' => $request->details,                    'submittedByName' => $request->submittedByName,                    'submittedByMobile' => $request->submittedByMobile,                    'submittedByEmail' => $request->submittedByEmail,                    'attachments' => $attachments,                    'attachmentCount' => $attachmentCount,                    'request' => $request                ])->id;    }}奇怪的是,值的$request變化取決于我轉(zhuǎn)儲/存儲它們的位置。例如,在我使用 登錄的日志文件中\(zhòng)Log::info($request),它顯示如下內(nèi)容:[2019-05-28 17:35:27] local.INFO: array (  'action' => 'TellUsMore',  'reportID' => 'b19xr211gcbvc',  'incidentDate' => '2019-05-29',  'location' => 'ggg',  'description' => 'gg',  'suggestion' => 'sdfsdf',  'files' =>   array (    0 =>     Illuminate\Http\UploadedFile::__set_state(array(       'test' => false,       'originalName' => 'reports (1).xlsx',       'mimeType' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',       'error' => 0,       'hashName' => NULL,    )),    1 =>     Illuminate\Http\UploadedFile::__set_state(array(       'test' => false,       'originalName' => 'love your parents - we\'re so busy growing up, we often forget that they\'re growing old.jpg',       'mimeType' => 'image/jpeg',       'error' => 0,       'hashName' => NULL,    )),  ),)  當(dāng)我將$request值存儲在數(shù)據(jù)庫中時也是如此。我打算存儲$request在我的 Laravel 日志文件中顯示的值,但它保存了$request在我的控制臺中顯示的值。我在這里錯過了什么?
查看完整描述

1 回答

?
慕森卡

TA貢獻(xiàn)1806條經(jīng)驗 獲得超8個贊

error_log()call $request->__toString(),您的 Log 類var_export()出于某種原因調(diào)用。這就是區(qū)別;)


查看完整回答
反對 回復(fù) 2021-07-16
  • 1 回答
  • 0 關(guān)注
  • 181 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號