php 从github克隆,但当我上传图像时,目录不是storage/public,而是C:\xampp\tmp

bqucvtff  于 2023-02-07  发布在  PHP
关注(0)|答案(1)|浏览(138)

enter image description here
下面是我代码

public function store(Request $request)
{

    $validateData = $request->validate([
        'pembelian_id' => '',
        'pconfirm_pic' => 'image|file|max:5087'
    ]);

    // $validatedData['pconfirm_pic'] = $request->file('pconfirm_pic')->store('payment_confirmation','public');
    
    
    
    
    Payconfirm::create($validateData);
    return redirect('/user/purchase/?status_pembayaran=1');
}

与控制器存储到的路径匹配

34gzjxbg

34gzjxbg1#

在artisan命令下运行

php artisan storage:link

阅读更多关于

相关问题