Upgrade Guide

Upgrade to 5.10

  • Override folder app, config, and platform from the latest version.

  • For developers:

    • Update file composer.json and composer.lock from new source code.
    • Delete folder /vendor then run composer install to upgrade vendor packages.
    • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force
    • Delete folder public/themes and run command php artisan cms:theme:assets:publish
    • Run command php artisan vendor:publish --tag=cms-lang --force to update translations.
    • Run php artisan optimize:clear to clear cache.
  • For non-developers:

    • Override folder public/themes, public/vendor, bootstrap, vendor from the latest version.
    • Delete all files in storage/framework/views and storage/framework/cache.
    • Go to Admin -> Translations -> Admin translations then click on Import group to update translations.

Upgrade to 5.9

  • Override folder app, config, and platform from the latest version.

  • For developers:

    • Update file composer.json and composer.lock from new source code.
    • Delete folder /vendor then run composer install to upgrade vendor packages.
    • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force
    • Delete folder public/themes and run command php artisan cms:theme:assets:publish
    • Run command php artisan vendor:publish --tag=cms-lang --force to update translations.
    • Run php artisan optimize:clear to clear cache.
  • For non-developers:

    • Override folder public/themes, public/vendor, bootstrap, vendor from the latest version.
    • Delete all files in storage/framework/views and storage/framework/cache.
    • Go to Admin -> Translations -> Admin translations then click on Import group to update translations.

Upgrade to 5.8

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Delete folder vendor then run composer install to re-install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.7

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Delete folder vendor then run composer install to re-install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.6

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Delete folder vendor then run composer install to re-install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.5

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Delete folder vendor then run composer install to re-install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.4

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Delete folder vendor then run composer install to re-install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.3

  • Override folder app, config, platform, resources/lang from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Run php artisan cms:plugin:activate translation to activate plugin Translation.
  • Run php artisan cms:translations:import to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.2

  • Override folder app, config, platform from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.1

  • Override folder app, platform from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 5.0

  • Override folder app, platform from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 4.2

  • Override folder app, platform from the update source code.
  • Override file composer.json and composer.lock from the update source code.
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Delete folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force
  • Remove all function setModuleName() in your plugins (if you have).

Upgrade to 4.1

  • Replace all config('media. to config('core.media.media.

  • Replace all trans('media:: to trans('core/media::

  • Replace all views('media:: to view('core/media::

  • Replace all @include('media:: to @include('core/media::

  • Replace all @extends('media:: to @extends('core/media::

  • Change the way to register media sizes if you add your custom image sizes:

Ex:

\RvMedia::addSize('featured', 560, 380);
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Remove folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 4.0

  • Copy your themes and plugins to new source code (v4.0)
  • Run composer install to install vendor packages
  • Run php artisan migrate to update database.
  • Change in .env: FILESYSTEM_DRIVER=public
  • Remove /storage from image URL in your database. Ex: change /storage/uploads/abc.jpg to uploads/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
```php
$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); to Language::registerModule(\Botble\{Plugin}\Models\{Plugin}::class)
  • SeoHelper::registerModule({PLUGIN}_MODULE_SCREEN_NAME); to SeoHelper::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) to apply_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);
  • 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));

Upgrade to 3.6.1

  • Override folder platform from the update source code.
  • Run composer update to update vendor packages.
  • Remove folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force

Upgrade to 3.6

  • Override folder platform from 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 update to update vendor packages.
  • Run php artisan migrate to update database.
  • Replace all public.index to public.single.
  • Remove folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force
  • We've changed method of "delete" button from GET to DELETE (http://prntscr.com/ohvrw0) so if you have custom plugins, you need to change all of it to DELETE in your plugin /routes/web.php
Route::get('delete/{id}', ...

To

Route::delete('delete/{id}', ...

And,

Route::post('delete-many', ...

To

Route::delete('delete-many', ...

Upgrade to 3.5

  • Override folder platform from the update source code.
  • Remove folder public/vendor/core and run command php artisan vendor:publish --tag=cms-public --force
  • Run composer install to update vendor packages.
  • Run php artisan migrate to update database.
  • Change the value for status column from publish to published.

Upgrade to 3.4

  • 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-theme to copy theme's assets to public/themes/your-theme
  • Run composer install and php artisan migrate

  • Run command php artisan storage:link

Upgrade to 3.3.1

  • Override folder core/base with new source code.

Upgrade to 3.3

  • 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.

Upgrade from 2.2 to 2.2.1

  • Replace 2 files core/base/resources/views/layouts/master.blade.php & core/table/src/Abstracts/TableAbstract.php

Upgrade from 2.1 to 2.2

  • 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 install to update vendor packages.
  • Run php artisan migrate to update database.

Upgrade from 2.0.1 to 2.1

  • Run composer install to update vendor packages.
  • Run php artisan migrate to 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

Upgrade from 2.0 to 2.0.1

  • Override folder /core and /plugins
  • Run "php artisan vendor:publish --tag=public --force" to update assets.
  • Run "php artisan migrate" to update database.

Upgrade from 1.1 to 2.0

  • Copy your theme to new source code.
  • Run composer install to update vendor packages.
  • Run php artisan migrate to update database.

{warning} Old custom plugins which you built with v1.1 will not work on v2.0.

Upgrade from 1.0 to 1.1

  • Using new source code from Codecanyon.
  • Run composer install to update vendor packages.
  • Run php artisan migrate to update database.