亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

找不到列:1054未知列'tbl_destinations.id'在'where子句'中的PDOException:SQLSTATE:在/var/www/html/...Connection.php:338中重寫為:找不到列:1054未知列'tbl_destinations.id'在'where子句'中的數(shù)據(jù)庫異常
P粉677573079
P粉677573079 2023-12-12 22:07:26
0
1
625

我的數(shù)據(jù)庫中的 id 字段是 des_id ,如何將其更改為 des_id?

Route::post('Itest/LoadSuppliers', function (Request $request) {
    $request->validate([
        'destination_id' => 'required|exists:mysql.tbl_destinations,des_id',
        'from' => 'required|numeric|min:0',
        'to' => 'required|numeric|min:0',
    ]);
    $destination_id = Destination::where('des_id','=', $request->destination_id)->firstOrFail();
    $from = $request->from;
    $to = $request->to;
    dispatch(new TestJob($destination_id, $from, $to));
    return response()->json([
        'status' => true
    ]);
});

P粉677573079
P粉677573079

全部回復(fù)(1)
P粉458725040

你的代碼對我來說看起來不錯(cuò)。

嘗試在您的目標(biāo)模型中進(jìn)行設(shè)置:

protected $primaryKey = 'des_id';
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板