This will guide you through upgrading from Backpack 3.3 to 3.4. For upgrading from 3.2 to 3.3 check out the previous upgrade guide.
As you can see, we've struggled very hard to make this version as backwards-compatible as possible. As such, the upgrade steps are small, and few projects will be negatively affected, unless they've overwritten default functionality.
composer require backpack/base:"^0.9.0" composer require backpack/crud:"^3.4.0"
This brings A LOT of new features and makes sure all components are up-to-date.
[OPTIONAL, but recommended]
config/app.phpfile, if you have any Backpack service providers or aliases (any for any Backpack package), you can remove them; they're no longer needed, since L5.5 loads them automatically;
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
adminmiddleware with the
backpack_middleware()helper; this will pull in the admin middleware name, since you can now change that in the config file;
Backpack\Base\app\Http\Middleware\Adminanywhere, make sure to extend the new class name:
backpack_auth()->check()etc, everywhere in your admin panel's custom controllers, models, views;
resources/views/vendor/backpack/base: 7.1. Delete any
baseblade files that you have not personally customized; namely
layout.blade.php; in most cases you should be left with only
inc/sidebar.blade.php; 7.2. Create a
inc//sidebar_content.blade.phpfile and copy all of your sidebar items and subitems there (
<li><a href=""></a></li>; here's an example file); 7.3. Delete your
resources/views/vendor/backpack/base/inc/sidebar.blade.phpfile; this is no longer used to store sidebar items, the one above is; and we have the added benefit of being able to do so from the command line;
public/vendor/adminltefolders; we will republish them shortly;
php artisan backpack:base:install; this might take a few minutes, but it will republish all assets needed;
browsefield type, run
composer require barryvdh/laravel-elfinderto install it, since it's no longer a mandatory requirement;
syncPivot()method, please note that it's no longer used inside the Create trait and in the Update trait; It hasn't been deprecated yet, but we do plan to remove it in the future since
createRelations()is a complete replacement for it, is more legible and supports 1-n relationships too;
search()method take a look at the changes and apply them to your own;
adminmiddleware with the configurable name, in you
config/elfinder.php, like so;
<span>s; example here;
date), you should update their JS and CSS assets like we have done here, to make sure it can still reach those assets;
list.blade.phpfile, you're in a pickle; the changes are massive; best thing to do would be to delete your file, copy the new one, and make the modifications you need again;
addColumn()statement before all the others, in your
php artisan view:clearto make sure your views are using the new assets.