Skip to content

Commit

Permalink
fix doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek committed Jan 27, 2024
1 parent c854751 commit 7ab182e
Show file tree
Hide file tree
Showing 20 changed files with 261 additions and 261 deletions.
60 changes: 30 additions & 30 deletions docs/docs/available-commands.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/docs/resource-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ The argument `[model-name]` should be replaced with the name of the model you ar

| Option | Description |
| ----------- | ----------- |
| <a name="resource-filename">--resource-filename</a> | The name of the file to be created. When this option is left out, the file will be the plural-form of the model name. If the model name is `AssetCategory`, the file name will be `asset_categories.json`. |
| <a name="fields">--fields</a> | A list of the field names to be created. The names should be separated by a comma. <br /><br /> You may also pass a complex string using the following schema <br /><br /> `--fields="name:colors;html-type:select;options:blue\|yellow\|green\|red\|white,name:second_field_name"` <br /><br /> Complex string are allowed and will be handy is some cases. However, in most cases all you need to pass is the field names as the common_definitions key in the configuration file will define most options for you out of the box using the name of the field.<br /><br /> Each field in the complex string must be seperated by a `,`. Also each property in the field must be seperated by `;` while each option of a property is seperated by `\|`. |
| <a name="relations">--relations</a> | A list of the relations to be created. The string should follow the schema below <br /><br /> `--relations="name:comments;type:hasMany;field:title;params:App\Models\Comment\|post_id\|id"` <br /><br /> Each relation in the string must be seperated by a `,`. Also each property in the relation must be seperated by `;` while each parameter of the params property seperated by `\|`. |
| <a name="indexes">--indexes</a> | A list of the indexes to be created. The string should follow the schema below<br /><br /> `--indexes="name:first_last_name_index;columns:first_name\|last_name"`. <br /><br /> Each index in the string must be seperated by a `,`. Also each property in the index must be seperated by `;` while each field name in the columns property seperated `\|`.|
| <a name="resource-filename"></a>--resource-filename | The name of the file to be created. When this option is left out, the file will be the plural-form of the model name. If the model name is `AssetCategory`, the file name will be `asset_categories.json`. |
| <a name="fields"></a>--fields | A list of the field names to be created. The names should be separated by a comma. <br /><br /> You may also pass a complex string using the following schema <br /><br /> `--fields="name:colors;html-type:select;options:blue\|yellow\|green\|red\|white,name:second_field_name"` <br /><br /> Complex string are allowed and will be handy is some cases. However, in most cases all you need to pass is the field names as the common_definitions key in the configuration file will define most options for you out of the box using the name of the field.<br /><br /> Each field in the complex string must be seperated by a `,`. Also each property in the field must be seperated by `;` while each option of a property is seperated by `\|`. |
| <a name="relations"></a>--relations | A list of the relations to be created. The string should follow the schema below <br /><br /> `--relations="name:comments;type:hasMany;field:title;params:App\Models\Comment\|post_id\|id"` <br /><br /> Each relation in the string must be seperated by a `,`. Also each property in the relation must be seperated by `;` while each parameter of the params property seperated by `\|`. |
| <a name="indexes"></a>--indexes | A list of the indexes to be created. The string should follow the schema below<br /><br /> `--indexes="name:first_last_name_index;columns:first_name\|last_name"`. <br /><br /> Each index in the string must be seperated by a `,`. Also each property in the index must be seperated by `;` while each field name in the columns property seperated `\|`.|
| --translation-for | [Described above](#translation-for) |
| --force | This option will override any file that already exist. |
:::
Expand Down Expand Up @@ -152,7 +152,7 @@ The argument `[model-name]` should be replaced with the name of the model you ar
| validation | You can pass any valid Laravel validation rule. The rules should be separated by bar `\|`. <br /><br /> For example: `required\|string\|min:2\|max:255` <br /><br />Start with Laravel 5.5, you can define custom validation rules and pass them as well. For example, to use a custom validation rule called Uppercase in addition to the required rule, you can pass this string required|new Uppercase.<br /><br /> To learn more about the valid options please visit [Laravel documentation](https://laravel.com/docs/master/validation#available-validation-rules). <br /><br /> When the rule `required` is not used, the field in the migration file will automatically become nullable. |
| html-type | Default value: `text`. A valid property will be one of the following options <br /> `text`, `textarea`, `password`,`email`,`checkbox`,`radio`,`number`,`select`,`hidden`,`file`,`selectRange`,`selectMonth`, or `multipleSelect`. <br /><br />Note: when using file type, after the file is uploaded to the designated path, the filename is stored in the database by default. For everything to work properly, the data-type must be of some sort of a string type. Or modify the behavior of moveFile method to handle the new file.<br /><br /> By default this process stores the uploaded file in the path defined in config file. <br /><br />Note: when using checkbox, or multipleSelect, the items are stored in the database as JSON string. Additionally, the items in the index or form views are displayed separated by the value provided in the delimiter property. |
| delimiter | Default value: "; ". When generating a form with checkbox or a select menu that accepts multiple answers, we need either store the results in a foreign model or store the records in a string field. By default, the code generator will convert the multiple options that a user selected into a JSON string before the results are stored using a Eloquent-mutator method. <br /><br />When the data is presented on the show and/or index views, the options are displayed separated by the value of the delimiter. Of course, you can always change this behavior to fit your needs by removing the accessor and mutator methods in the model and modifying the views accordingly. |
| css-class | You can add custom css class(es) to the html input. Any value is placed in this option will be appended to the field's `class="..."`` property. Classes that are already set in the views will not be replaced. |
| css-class | You can add custom css class(es) to the html input. Any value is placed in this option will be appended to the field's `class="..."` property. Classes that are already set in the views will not be replaced. |
| date-format | Default value: "m/d/Y H:i A". Any field with the type date, time or datetime can be formatted different when it is displayed. You can change the display format using this option. |
| html-value | A default value to set the field to. When using multiple options based html-type like checkbox, multipleSelect you can set this property to array of values to set multiple values by default. Ex, `["Red","Green"]` |
| options | If you used select, checkbox, or radio for the html-type property, this is where you provide the options. Here are some example of the schema. <br /> <br /> A simple array: In this option, the value will be the numeric index value of the item in the array. <br /> ```"options": ["Prefer not to say","Male","Female"]```.<br /> Using explicit values <br /> ```"options": { "": Prefer not to say", "male": "Male","female": "Female"}```. <br /> Using multiple language phrases for each option <br /> ```"options": {"en":{"":"Prefer not to say","male":"Male","female":"Female"},"ar":{"":"Prefer not to say in Arabic","male":"Male in Arabic","female":"Female in Arabic"},"fr":{"":"Prefer not to say in French","male":"Male in French","female":"Female in French"}}``` |
Expand All @@ -161,8 +161,8 @@ The argument `[model-name]` should be replaced with the name of the model you ar
| is-on-index | Default value: `true`. Setting the value to `false` will prevent from adding this field to the index view. |
| is-on-form | Default value: `true`. Setting the value to `false` will prevent from adding this field to the form view. |
| is-on-show | Default value: `true`. Setting the value to `false` will prevent from adding this field to the show view. |
| is-on-views | Default value: `true`. Setting the value to `false`` will prevent from adding this field to the index, form or show view. This is just a short way to change the visibility for all views. |
| is-header | Default value: false. Only one field can be set to a header. The header field will be use as the page header in the show view. The key `common_header_patterns`` in the configuration file, allow you to list the common field name to automatically set them as header. |
| is-on-views | Default value: `true`. Setting the value to `false` will prevent from adding this field to the index, form or show view. This is just a short way to change the visibility for all views. |
| is-header | Default value: false. Only one field can be set to a header. The header field will be use as the page header in the show view. The key `common_header_patterns` in the configuration file, allow you to list the common field name to automatically set them as header. |

#### Database Properties
| Property name | Description |
Expand Down
Loading

0 comments on commit 7ab182e

Please sign in to comment.