Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate behavior when calling the image address column with eloquent in roudrunner #969

Open
rezahmady opened this issue Nov 25, 2024 · 0 comments

Comments

@rezahmady
Copy link

Octane Version

2.5.9

Laravel Version

11.30.0

PHP Version

8.3.11

What server type are you using?

Roadrunner

Server Version

ubuntu 2020

Database Driver & Version

Mysql 8

Description

Suppose I have a text column that stores the URL of my article image in the articles table. As soon as I start octane, my image display is disrupted and when I refresh the page, sometimes it returns the full URL, meaning the entire field, and sometimes it returns only the file name from the URL and clears it first. I got this in the model log layer:

public function getImage()
    {
        $image = ($this->image) ? asset(Storage::url($this->image)) : Setting::get('articles.default_image');
        Log::info($this->image);
        return $image;
    }

log results:

Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
uploads/images/blog/Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
uploads/images/blog/Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg
Yklqt56DCLdEOJ0C9g6f57fdk8JUEp6SO21o16GL.jpeg

this log record with refresh page

Steps To Reproduce

I explained the problem completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant