0
我有一個數組再次出現問題。但是這次我需要插入數據庫。數組到字符串轉換插入數據庫
Checks::find($id)->update($request->all());
$issue[] = $request->issue;
foreach ($issue as $item) {
dd($item);
addIssues::create([
'check_id' => $id,
'issue_id' => $item
]);
}
遷移:
Schema::create('checks_issues', function (Blueprint $table) {
$table->string('check_id');
$table->string('issue_id');
$table->timestamps();
$table->primary(['check_id','issue_id']);
});
請出示的dd'的結果($請求 - >問題)' –