- Upgrade To 4.0
- Upgrade To 3.6.1
- Upgrade To 3.6
- Upgrade To 3.5
- Upgrade To 3.4
- Upgrade To 3.3.1
- Upgrade To 3.3
- Upgrade To 3.2.1
- Upgrade To 3.2
- Upgrade To 3.1
- Upgrade To 3.0.2
- Upgrade To 3.0.1
- Upgrade To 3.0
- Upgrade To 2.6
- Upgrade To 2.4.1
- Upgrade To 2.4
- Upgrade To 2.3
- Upgrade To 2.2.1
- Upgrade To 2.2
- Upgrading To 2.1
- Copy your themes and plugins to new source code (v4.0)
- Run
composer installto install vendor packages - Run
php artisan migrateto update database. - Change in
.env:FILESYSTEM_DRIVER=public - Remove
/storagefrom image URL in your database. Ex: change/storage/uploads/abc.jpgtouploads/abc.jpg - Update helper functions: Ex:
// Before
function get_meta_data($object->id, $key, $screen, $single = false, $select = ['meta_value'])
// Now
function get_meta_data($object, $key, $single = false, $select = ['meta_value'])- Add setupModel method into your plugin forms. Ex: platform/plugins/blog/src/Forms/PostForm.php:54
$this->setupModel(new Post);- Change screen's name to model class name in some functions: https://prnt.sc/pqyaiz
Language::registerModule({PLUGIN}_MODULE_SCREEN_NAME);toLanguage::registerModule(\Botble\{Plugin}\Models\{Plugin}::class)SeoHelper::registerModule({PLUGIN}_MODULE_SCREEN_NAME);toSeoHelper::registerModule(\Botble\{Plugin}\Models\{Plugin}::class)- Change
config([
'packages.slug.general.supported' => array_merge(config('packages.slug.general.supported'), [{PLUGIN}_MODULE_SCREEN_NAME]),
]);to
SlugHelper::registerModule(\Botble\{Plugin}\Models\{Plugin}::class);- Update your plugin's tables:
- Change
apply_filters(BASE_FILTER_GET_LIST_DATA, $data, {PLUGIN}_MODULE_SCREEN_NAME)toapply_filters(BASE_FILTER_GET_LIST_DATA, $data, $this->repository->getModel()) - Change
$this->applyScopes(apply_filters(BASE_FILTER_TABLE_QUERY, $query, $model, {PLUGIN}_MODULE_SCREEN_NAME));to
$this->applyScopes(apply_filters(BASE_FILTER_TABLE_QUERY, $query, $model));- Change
apply_filters(BASE_FILTER_TABLE_BUTTONS, $buttons, {PLUGIN}_MODULE_SCREEN_NAME);to
apply_filters(BASE_FILTER_TABLE_BUTTONS, $buttons, Post::class);- Override folder
platformfrom the update source code. - Run
composer updateto update vendor packages. - Remove folder
public/vendor/coreand run commandphp artisan vendor:publish --tag=cms-public --force
- Override folder
platformfrom the update source code. - Update your composer.json with the latest composer.json or update changes from latest version http://prntscr.com/ohvwfw.
- Run
composer updateto update vendor packages. - Run
php artisan migrateto update database. - Replace all
public.indextopublic.single. - Remove folder
public/vendor/coreand run commandphp artisan vendor:publish --tag=cms-public --force - We've changed method of "delete" button from
GETtoDELETE(http://prntscr.com/ohvrw0) so if you have custom plugins, you need to change all of it toDELETEin your plugin /routes/web.php
Route::get('delete/{id}', ...To
Route::delete('delete/{id}', ...And,
Route::post('delete-many', ...To
Route::delete('delete-many', ...- Update in your plugin's controllers, remove screen name from
BeforeEditContentEvent: Change
event(new BeforeEditContentEvent({PLUGIN}_MODULE_SCREEN_NAME, $request, $data));To
event(new BeforeEditContentEvent($request, $data));- Override folder
platformfrom the update source code. - Remove folder
public/vendor/coreand run commandphp artisan vendor:publish --tag=cms-public --force - Run
composer installto update vendor packages. - Run
php artisan migrateto update database. - Change the value for
statuscolumn frompublishtopublished.
-
You need to copy your changes to new source code.
-
From this version, all core modules, plugins and themes are located in /platform folder.
- If you've created your plugins, you need to copy it into /platform/plugins folder.
- If you've created your themes, you need to copy it into /platform/themes folder and run command
php artisan cms:theme:assets:publish your-themeto copy theme's assets topublic/themes/your-theme
-
Run
composer installandphp artisan migrate -
Run command
php artisan storage:link
- Override folder
core/basewith new source code.
-
This is big version. It has many change on core system so the easiest way to upgrade to new version is copy what your changes (your themes, plugins, translations) to new source code.
-
Run
php artisan migrate,php artisan vendor:publish --tag=public --force -
Run
composer updateto update vendor packages.
- Replace 3 files:
core/base/resources/views/layouts/master.blade.php,core/table/src/Abstracts/TableAbstract.php&plugins/block/src/Repositories/Eloquent/BlockRepository.php
- Override folder /core & /plugins with new source code.
- Run
php artisan vendor:publish --tag=public --force - Run
php artisan vendor:publish --tag=lang --force - Run
composer installto update vendor packages. - Run
php artisan migrateto update database.
- Run
composer installto update vendor packages. - Run
php artisan migrateto update database. - Deprecated classes: Botble\Base\Tables\TableAbstract & Botble\Base\Tables\TableBuilder will be removed in the next version, please change to use Botble\Table\Abstracts\TableAbstract & Botble\Table\TableBuilder
- Replace file plugins/custom-field/src/Http/Controllers/CustomFieldController.php, plugins/custom-field/src/Forms/CustomFieldForm.php and plugins/custom-field/resources/views/rules.blade.php with new ones which downloaded from Codecanyon
- Override folder /core and /plugins
- Run "php artisan vendor:publish --tag=public --force" to update assets.
- Run "php artisan migrate" to update database.
- Make sure PHP version to your server >= 7.1.3
- Copy your theme to new source code.
- Run
composer installto update vendor packages. - Run
php artisan migrateto update database.
{warning} Old custom plugins which you built with Botble CMS v2.6 will not work on v3.0.
- Run
composer installto update vendor packages. - Run
php artisan migrateto update database.
- Run
composer installto update vendor packages. - Run
php artisan plugin:activate member
- Copy what you changes (plugins, themes) and paste to new version 2.4.
- Route
public.single.detailchange topublic.single. - Should use new database from /database.sql. Old database can not be used.
{warning} You should not upgrade to version 2.3 if your project is stable now. Because it has a lot of change so it can break your site.
-
Override folder
/coreand/pluginsfrom new version. -
Replace
public/vendorfolder or runphp artisan vendor:publish --tag=assets -
Check and update manually 3 files:
composer.json,gulpfile.js,.env -
Because we created new media management and changed database so you have to re-upload all your files.
-
Replace
get_file_by_size()byget_image_url()
Remove admin bar configuration in your theme
class="{{ admin_bar_class() }}"
{!! admin_bar() !!}
Remove admin breadcrumb in your plugin if it is exists.
{!! Breadcrumbs::render('pageTitle', trans('download::category.create'), Route::currentRouteName()) !!}
<div class="clearfix"></div>
Remove this line on /config/app.php
Lord\Laroute\LarouteServiceProvider::class,
Remove laroute on composer.json
"lord/laroute": "~2.4",
There are many changes on gulpfile.js so if you don't change anything on this file. Please replace it with new gulpfile.js.
Then, if you are using Linux or OSX, you can use upgrade.sh to continue upgrade to version 2.2.
$ sudo chmod -R 777 upgrade.sh
$ ./upgrade.sh
Upgrade script for Windows OS will be update soon. From now, you can follow upgrade.sh content to upgrade your source code.
{warning} This version using Laravel Framework 5.4 so if you are working on Laravel 5.3, please override all default files and folders of Laravel version 5.4 before upgrade.
Override folder /core and /plugins from new version.
Replace public/vendor folder.
- composer.json
- gulpfile.js
- .env