-
Notifications
You must be signed in to change notification settings - Fork 2
Commands
William Espindola edited this page Sep 23, 2015
·
9 revisions
To run field just execute php vendor/bin/field
by combining with commands bellow
Start creating the config file to keep your database credentials, the Field will use this for the CRUD. Optionaly you can pass a custom path to create the field.config.php
file and in the future just use -c you/path/field.config.php
to run.
Usage:
init [<path>]
Arguments:
path Which path should we initialize for Field?
##Schema We make a userfull database schema for this project, and your can see this on data/ folder. And we have some command to help you to create the tables in your db.
Usage:
schema [options] [--] [<show-only>]
Arguments:
show-only Show sql instead install
With the create command you can create Fields and Collections.
Usage:
create [options] [--] <Field|Collection|Language|Option> <name> <label> [<type>] [<collection>]
Arguments:
Field|Collection|Language|Option Field, Collection, Language or Option
name The name is the identify of our registry
label The Label for the presentation of your registry
language The Language of registry. Required when create Field and Collections
type The type of field (only field has types)
collection The collection name of field new field
Some examples!
creating a Language
php vendor/bin/field create Language en_EN English
creating a Collection
php vendor/bin/field create Collection header Header en_EN
creating a Field
php vendor/bin/field create Field meta-keys Metakeys en_EN text header
creating a Field without collection
php vendor/bin/field create Field about "About text" en_EN html
creating Options
you need to create a field for your option
php vendor/bin/field create Field contact Contact en_EN text
php vendor/bin/field create Option Girl contact en_EN
php vendor/bin/field create Option Boy contact en_EN