laravel9 route model binding attachment 404 error - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, August 22, 2022

laravel9 route model binding attachment 404 error

Route::get('attachments/{attachment:path}',[AttachmentController::class, 'show']);

Storage::disk('local')->putFile(date('Ymd',time()),$request->file('file'))

public function show(Attachment $attachment)
{
    return Storage::disk('local')->response($attachment->path);
}

catalogue:storage/app/

404 error database patah=20220821/6ILPOXKBzWqkxkLXvbuMW9b7drcsIo6FNeMOJAc8.png

access database patah=6ILPOXKBzWqkxkLXvbuMW9b7drcsIo6FNeMOJAc8.png

Is there a solution?



source https://stackoverflow.com/questions/73433404/laravel9-route-model-binding-attachment-404-error

No comments:

Post a Comment