Download the PHP package tunecino/yii2-schema-builder without Composer

On this page you can find all versions of the php package tunecino/yii2-schema-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-schema-builder

Schema Builder

Latest Stable Version Total Downloads License

GUI built on top of Gii, migration tool, and other extensions to quickly prototype and generate working apps.

schema-builder-cover

How it works

It is about two main things:

:bangbang: IMPORTANT :bangbang:

This extension is meant to be used with new creations only. If Gii UI has the decency to ask before overriding stuff, this extension won't. Its default Gii console commands are labeled by --interactive=0 and --overwrite=1 flags. So it will literally destroy your DATABASE plus any existing code found on its way.

Installation

In case you are starting new build based in the official advanced template to either create WEB or REST app then you may check tunecino/yii2-app-builder which is a fork of the advanced template to which I have added and configured this extension.

Otherwise, you can add this extension to your template of choice through composer by either running

or by adding

to the require-dev section of your composer.json file.

Usage

Once the extension is installed, add it to both web.php and console.php configuration files:

You can then access it through the following URL:

or http://localhost/path/to/index.php/builder depending on your app routing configurations. Also note that it is not required to name the module builder you can use schema-builder or any other name you like.

Once there, create your first schema (ex: admin, v1), set all its related configurations at once (form inputs are organized within different tabs) then click on the created schema to get into its view page and start adding entities (ex: user, book). To each entity you need to add attributes and define relationships if there is any (no need to declare any id or xxx_id columns as those will be auto generated). Once your schema is complete go back to its view page and hit that GENERATE button.

Optional Attributes

allowedIPs: The list of IP adresses allowed to access the builder tool. default to ['127.0.0.1', '::1'].

yiiScript: The path that points to ./yii script. default to @app/yii.

dataPath: Path to store GUI related data and settings. default to 'runtime/schema-builder/data'.

previewUrlCallback: If the preview link doesn't correctly point to your resources, this is where you declare your own function to generate the correct link. see default implementation here.

commands: This is the array holding the list of commands to be dynamically generated. A command can be represented within a simple string, a callable function or a generator:

Custom generators are required when you need to collect user inputs for settings. A generator should have a form.php file (like gii generators) that will be auto rendered in a separate tab with the schema create/update form. Related inputs will be saved within GUI data.

Default value of $commands is the following:

Copy any of those classes from the extension and adapt it to your needs when you need to create a custom generator.

Keep in mind when building your own logic that both callable functions as generators have access to the $schema instance being selected. From that instance you can access to all the GUI ActiveRecord classes which are Attribute, Entity and Relationship. Please refer to tunecino\builder\models folder and see the code for more details.

Other example, an advanced example list of commands could also be seen here which are the related commands for generating working REST resources in the app template I linked before.

Built With

TODO

License

This project is licensed under the MIT License - see the LICENSE.md file for details.


All versions of yii2-schema-builder with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version >=2.0.4
yiisoft/yii2-gii Version ~2.0.0
yiisoft/yii2-bootstrap Version ~2.0
yii2tech/filedb Version ^1.0
bower-asset/flat-ui Version 2.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tunecino/yii2-schema-builder contains the following files

Loading the files please wait ....