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

fix: replace add-sidebar-content #29

Merged

Conversation

treckstar
Copy link
Contributor

The add-sidebar-content command has been
replaced with add-menu-content in v6.

WHY

BEFORE - What was wrong? What was happening before this PR?

When installing FileManager with composer, the backpack:add-sidebar-content command causes an error to occur. This command has been replaced with backpack:add-menu-content in v6.
Error Link

AFTER - What is happening after this PR?

The command runs backpack:add-menu-content which functions as expected.

HOW

How did you achieve that, in technical terms?

Replaced the two commands in the file src/Console/Commands/Install.php

Is it a breaking change or non-breaking change?

Breaking

How can we test the before & after?

Create a new version of Laravel 10

laravel new test-backpack6-filemanager
cd test-backpack6-filemanager

Then follow the Installation instructions.

From your command line, require the package (this will also require barryvdh/laravel-elfinder):

composer require backpack/filemanager

Then run the install process:

php artisan backpack:filemanager:install

The `add-sidebar-content` command has been
replaced with `add-menu-content` in v6.
@pxpm
Copy link
Contributor

pxpm commented Jul 3, 2023

Thank you for the bug report, and specially for the PR @treckstar 🙏

Wanna take this to the end until merging ? I can help you or I can take it from here if you don't have time/desire to finish it.

We have now menu components to use in the sidebar, so instead of returning the <li> ... we return a backpack component with the menu item: <x-backpack::menu-item title="Link title" icon="la la-toolbox" :link="backpack_url('some_url')" />.

Each theme will then display the menu item accordingly to their settings.

Let me know if you want to do the change or I should pick it from here.

Cheers

@pxpm pxpm self-assigned this Jul 3, 2023
@pxpm pxpm added the bug Something isn't working label Jul 3, 2023
@treckstar
Copy link
Contributor Author

Sure no problem, I made a quick update. Feel free to take over if needed. Backpack has been really great so far. 👍🏼

@pxpm pxpm merged commit 49904ff into Laravel-Backpack:main Jul 3, 2023
2 checks passed
@pxpm
Copy link
Contributor

pxpm commented Jul 3, 2023

Thanks again @treckstar 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants