Regenerate list & forms that have been customized
(How to use the CRUD Generator file comparison tool)

The File comparison tool allows to diff the Bootstrap Admin files between the Generator Backup folder and the Admin Panel.


Compare and merge the different versions of your admin files

What is the usefulness of the PHPCG comparison tool?

In some specific cases it may be useful to customize some files of the Bootstrap Admin Dashboard - so modify the code created by the CRUD Generator.
This is especially true for PHP classes, TWIG templates and forms.

If you have modified the source code, and regenerate the files using the CRUD Generator, for example following a modification of your database or simply to change your settings, the files will be overwritten and you will lose your custom code.

To avoid this problem PHP CRUD Generator offers an efficient tool, called the "File Comparison Tool".

PHP CRUD Generator's File Comparison tool
PHP CRUD Generator's File Comparison tool

Compare & merge your old/new admin files

The File comparison tool is available from your web browser, in the CRUD Generator's Tools part.

  1. 1

    Click to open the dropdown list.
    You'll see the admin files listed in several option groups, which represent your admin panel tree structure:

    • class/crud/
    • crud-data/
    • database/[db-name]/
    • inc/forms/
    • templates
  2. 2
    Select the file you want to compare in the list, then click the Compare button.
    The comparison tool will open in a new tab.
  3. 3

    In the comparison tool you can see two columns:

    • The left column shows the source code of your file from the Generator backup directory
    • The right column shows the source code of the new file in the Admin directory

    Click on the different code parts to keep, in the left or right column,
    then click on the Merge button at the bottom of the page.

  4. 4

    Done - the Admin file has been updated according to the code you choosed.

Prerequisites

To use PHPCG's Comparison tool you must beforehand:

PHP CRUD tutorial main page