Skip to content
This repository was archived by the owner on Nov 23, 2020. It is now read-only.

Conversation

tabacitu
Copy link
Member

@tabacitu tabacitu commented Mar 8, 2018

This PR is here to document all major changes between 0.8.x and 0.9.x. It will help us easily detect breaking changes, document them, and create the upgrade guide.

PRs

Upgrade guide

  • Replace admin middleware with backpack_middleware() helper. By default, Backpack used a middleware called admin to allow/deny access to admin pages. This middleware name can now be customized in config/backpack/base.php. To future-proof your applications, it's recommended that you change this middleware name everywhere you've used it, to the new backpack_middleware() helper that automatically pulls the name (check your routes and controllers).
  • The admin middleware's class has been renamed to CheckIfAdmin; if you were extending Backpack\Base\app\Http\Middleware\Admin anywhere, make sure to extend the new class name: Backpack\Base\app\Http\Middleware\CheckIfAdmin;
  • All admin classes and views should now use the backpack_auth() helper instead of Laravel's default Auth facade, so that if any custom guards are specified in config/backpack/base.php, they're taken into account; So if you've used something like Auth::user() anywhere in an admin panel controller/model/view/request, please replace with backpack_auth->user(); we've replaced this ourselves in the following files: sidemenu.blade.php, menu.blade.php, sidebar.blade.php, sidebar_user_panel.blade.php; make sure you apply the changes if you've overwritten them; if you've never ever modified those files, but they're in your resources/views/vendor/backpack/base folder, just delete them from there, and Backpack will pick up the fresh files from the package folder instead; you can also use the backpack_guard() helper if you need the guard name anywhere;
  • We no longer use sidebar.blade.php to hold all our sidebar items. We've moved that to a file called sidebar_content.blade.php, so that you can also automatically generate sidebar items; Please create a new file called sidebar_content.blade.php and copy all your sidebar items there, then either delete your sidebar.blade.php file or replace the old sidebar items with @include('backpack::inc.sidebar_content'); take a look here for an example in code;
  • By default, Backpack\Base no longer pushes all views in your views folder. Only the absolute necessary (sidebar_content.blade.php). If you have views in resources\views\vendor\backpack\base that you have never modified, please remove them (especially layout.blade.php); This will make sure you benefit from any updates we push, further down the line; Backpack will pick up the new files from the package folder, automatically;
  • In order to be able to trigger notification bubbles that include HTML, you need to make a small change to your alerts view. But since you most likely haven't ever modified it, the easiest way to do this would be to just delete the resources/views/vendor/backpack/inc/alerts.blade.php file; Backpack will automatically pick up the original file from the package afterwards;
  • Starting with Backpack\Base 0.9.0, we have a new place for you to store your admin routes: routes/backpack/custom.php. That's where CRUD::resource() routes are generated automatically, when you generate a new CRUD. To future-proof your application, you can publish that file using php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" --tag=custom_routes, then manually move your existing admin routes there (from your routes/web.php.

jorenvanhee and others added 30 commits May 2, 2017 12:08
…envanhee/Base into jorenvanhee-different-user-model-issue-fix
*/
private function checkLicenseCodeExists()
{
if (! env('BACKPACK_LICENSE')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be in a config?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Totally! Done, thank you!

@tabacitu tabacitu merged commit 1a04f2c into master Mar 22, 2018
@tabacitu
Copy link
Member Author

BOOM!

It's done :-) tested, merged, tagged and launched. See:

Thank you so much for all the help, guys! This has been a HUGE effort.

@shirshak55
Copy link
Contributor

nice :____

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants