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

Regenerate media after assigning doesn't work in production #25

Closed
AbdallaMohammed opened this issue Aug 21, 2022 · 1 comment · Fixed by #27
Closed

Regenerate media after assigning doesn't work in production #25

AbdallaMohammed opened this issue Aug 21, 2022 · 1 comment · Fixed by #27

Comments

@AbdallaMohammed
Copy link

Hi,

There's a problem in regenerating media after assigning it to a model in production mode, since there is a warning that asks you whether you're sure to do this command.

This warning confirmation is the reason why Artisan::call('media-library:regenerate') isn't working in production mode.

To circumvent the warning, you can use the --force flag like so:

Artisan::call('media-library:regenerate', [
   '--ids' => implode(',', $mediaIds),
   '--force' => true,
]);
@ahmed-aliraqi
Copy link
Owner

@AbdallaMohammed Thanks for your contribution 👍

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

Successfully merging a pull request may close this issue.

2 participants