Kostya Khmylov
Kostya Khmylov

Reputation: 23

Images are not displayed on the site after they are sent through the database Laravel Backpack

I encountered a problem that after uploading a photo to the site through the admin panel, the photo appears in the database but does not appear in the public folder for display on the site. I did not change the filesystem.php after the backpack installation. The only changes were in this file, where the interactions are written

InstagramPostsCrudController.php

protected function setupCreateOperation()
    {
        CRUD::setValidation(InstagramPostsRequest::class);
        CRUD::setFromDb();
        CRUD::field('photo')->type('upload');
    }

Upvotes: 0

Views: 34

Answers (1)

jcastroa87
jcastroa87

Reputation: 391

as our docs says, please try with

CRUD::field('photo')->type('upload')->withFiles(true);

Make sure you have correctly set the public symlink too

php artisan storage:link

Cheers.

Upvotes: 1

Related Questions