Skip to content

Commit

Permalink
Update documentation to fix typos and update consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
holmesadam committed Dec 4, 2024
1 parent 2a4e327 commit a5fd917
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 107 deletions.
4 changes: 2 additions & 2 deletions docs/advanced/add-datasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 5
Create a custom data source for your forms and make it available as a collection.
Datasources are helpful for creating custom collections from different models or an external API.

to create datasource, use the following command, passing the name of the data source:
To create datasource, use the following command, passing the name of the datasource:

```bash
php artisan make:zeus-datasource Car
Expand All @@ -20,7 +20,7 @@ Bolt will automatically list the data sources from your app in the form builder
There is a cache for all collections, so remember to flush the key `bolt.datasources`

## Customization
check out the contract `LaraZeus\Bolt\DataSources\DataSourceContract` and see all the available methods.
Check out the contract `LaraZeus\Bolt\DataSources\DataSourceContract` and see all the available methods.

### Disabling

Expand Down
10 changes: 5 additions & 5 deletions docs/advanced/add-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ There is a cache for all fields, so remember to flush the key `bolt.fields`

## Customization

check out the contract `LaraZeus\Bolt\Fields\FieldsContract` and see all the available methods.
Check out the contract `LaraZeus\Bolt\Fields\FieldsContract` and see all the available methods.

### Disabling

Expand All @@ -39,7 +39,7 @@ You can turn off any field temporally by adding:
public bool $disabled = true;
```

### Field Title:
### Field Title

```php
public function title(): string
Expand All @@ -50,7 +50,7 @@ public function title(): string

### Field Options

you can add any options to be shown on the admin page when creating the form
You can add any options to be shown on the admin page when creating the form

```php
public static function getOptions(): array
Expand All @@ -76,7 +76,7 @@ public function appendFilamentComponentsOptions($component, $zeusField)

### Disable the options tab

if your field doesn't have any options, you can turn off the options tab by removing the method `getOptions` or returning false:
If your field doesn't have any options, you can turn off the options tab by removing the method `getOptions` or returning false:

```php
public function hasOptions(): bool
Expand All @@ -87,7 +87,7 @@ public function hasOptions(): bool

### View the Response

you can control how to view the response on the entries pages
You can control how to view the response on the entries pages

```php
public function getResponse($field, $resp): string
Expand Down
12 changes: 6 additions & 6 deletions docs/advanced/custom-designer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ weight: 7

## Use Custom Designer

the trait `Designer` is the one responsible for presenting the form in the frontend, and now you can customize it to your liking.
The trait `Designer` is the one responsible for presenting the form in the frontend, and now you can customize it to your liking.

> **Note**\
> This is an advanced feature; please use it only when necessary since you have to mainline it manually with every update for Bolt.
### First, copy the trait to your app:
### First, copy the trait to your app

copy the trait from `\LaraZeus\Bolt\Concerns` to your app, let say: `\App\Zeus\Bolt\Concerns`
Copy the trait from `\LaraZeus\Bolt\Concerns` to your app, lets say: `\App\Zeus\Bolt\Concerns`

### call the trait in a service provider
### Call the trait in a service provider

in your register method of your `AppServiceProvider` add the following:
In your register method of your `AppServiceProvider` add the following:

```php
\LaraZeus\Bolt\Filament\Resources\FormResource::getBoltFormSchemaUsing(fn(): array => \App\Zeus\Bolt\Concerns\Designer::getMainFormSchema());
```

You're done. Customize the form builder to fit your needs. Remember to keep an eye on any changes in future updates so that you will avoid breaking changes.
You're done. Customize the form builder to fit your needs. Remember to keep an eye on any changes in future updates so that you avoid breaking changes.
22 changes: 11 additions & 11 deletions docs/advanced/custom-schemata.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 6

Bolt allows you to add custom components (additional metadata) to the form, sections, and fields.

### First: create the class:
### First: create the class

Create a class wherever you want in your app for example in `App\Zeus\CustomSchema` with the content:

Expand Down Expand Up @@ -42,10 +42,10 @@ class Field implements CustomSchema
}
```

- make sure to return the hidden fields the same as the fields you have defined in the `make` method
- make sure to set the `state` correctly, if you want to store this info in the `options` then use `options. more data, or in a separate column then make sure to create the migration for it
- Make sure to return the hidden fields the same as the fields you have defined in the `make` method
- Make sure to set the `state` correctly, if you want to store this info in the `options` then use `options. more data, or in a separate column then make sure to create the migration for it

### Second: add it to your panel config:
### Second: add it to your panel config

```php
BoltPlugin::make()
Expand All @@ -56,7 +56,7 @@ BoltPlugin::make()
])
```

### Third: catch it on the `FormSent` event, for example:
### Third: catch it on the `FormSent` event, for example

```php
$event->response->fieldsResponses->each(function($fieldResponse){
Expand All @@ -66,25 +66,25 @@ $event->response->fieldsResponses->each(function($fieldResponse){
});
```

_**Warning: This is a simplified example, so don't trust your user input explicitly. That could open some pretty serious security holes.**
>**Warning: This is a simplified example, so don't trust your user input explicitly. That could open some pretty serious security holes.**
## Replace the Schemata with Custom one

the trait `Schemata` is the heart of the form builder, and now you can customize it to your liking.
The trait `Schemata` is the heart of the form builder, and now you can customize it to your liking.

> **Note**\
> This is an advanced feature; please use it only when necessary since you have to mainline it manually with every update for Bolt.
### First, copy the trait to your app:
### First, copy the trait to your app

copy the trait from `\LaraZeus\Bolt\Concerns` to your app, let say: `\App\Zeus\Bolt\Concerns`
Copy the trait from `\LaraZeus\Bolt\Concerns` to your app, lets say: `\App\Zeus\Bolt\Concerns`

### Call the trait in a service provider

in your register method of your `AppServiceProvider` add the following:
In your register method of your `AppServiceProvider` add the following:

```php
\LaraZeus\Bolt\Livewire\FillForms::getBoltFormDesignerUsing(\App\Zeus\Bolt\Concerns\Designer::class);
```

You're done. Customize the form builder to fit your needs. Remember to keep an eye on any changes in future updates so that you will avoid breaking changes.
You're done. Customize the form builder to fit your needs. Remember to keep an eye on any changes in future updates so that you avoid breaking changes.
14 changes: 7 additions & 7 deletions docs/advanced/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ weight: 3

## Extensions

Bolt over a simple way to build your own application around the forms, with a simple interface, called `extensions` :
Bolt offer a simple way to build your own application around the forms, with a simple interface, called `extensions` :

Extensions are hooks based classes that let you perform your logic around the forms or catch the submission and do more integrations with other apps or external APIs.
for example before showing the form, or after storing the data etc...

## Available Hooks:

- `canView`
before displaying the form, you can do some checks.
before displaying the form, you can do some checks

- `render`
what to show at the beginning of the form, you can return a view to show more info or instructors while filling out the form.
what to show at the beginning of the form, you can return a view to show more info or instructors while filling out the form

-`formComponents`
return an array of filament components to add them to the form in the frontend

- `store`
the store logic for the extension, insert to any DB or external API.
the store logic for the extension, insert to any DB or external API

- `postStore`
this is typically used for sending only. It will be executed after saving the form
Expand All @@ -33,7 +33,7 @@ for example before showing the form, or after storing the data etc...

## Creating an Extension

create a class in your app with the following content:
Create a class in your app with the following content:

>I will create a command later :)
Expand Down Expand Up @@ -105,12 +105,12 @@ class Items implements Extension

## Enabling The Extension

in your `zeus-bolt` config file, add your extension to the array:
In your `zeus-bolt` config file, add your extension to the array:

```php
'extensions' => [
\App\Zeus\Extensions\Items::class,
],
```

now when creating or editing a form, you will see the tab Extensions, and you can select any extension per form.
Now when creating or editing a form, you will see the tab Extensions, and you can select any extension per form.
2 changes: 1 addition & 1 deletion docs/advanced/render-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Bolt also utilizes these hooks to make it easier to customize any views.
- will be rendered above all forms before any other content like the `details.`

- `Zeus-form.after`
- this hook will rendered after all forms
- this hook will be rendered after all forms

- `Zeus-form-section.before`
- before rendering any section in all forms
Expand Down
10 changes: 4 additions & 6 deletions docs/bolt-pro/advanced-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ title: Integrated with Advanced Tables
weight: 5
---

The Advanced Tables (formerly Filter Sets) plugin from [Kenneth Sese](https://filamentphp.com/plugins/kenneth-sese-advanced-tables), to Supercharge your tables with powerful features like user customizable views, enhanced filter tabs, reorderable columns, convenient view management, and more. now, fully integrated to create powerful reports from your dynamic forms.
The Advanced Tables (formerly Filter Sets) plugin from [Kenneth Sese](https://filamentphp.com/plugins/kenneth-sese-advanced-tables), to Supercharge your tables with powerful features like user customizable views, enhanced filter tabs, reorderable columns, convenient view management, and more. Now fully integrated to create powerful reports from your dynamic forms.

You will need a separate license for the Advanced Tables plugin to activate these features.

## enable the Advanced Tables Plugin
## Enable the Advanced Tables Plugin

after installing Advanced Tables, the the filters will be available in forms immediately.
After installing Advanced Tables, the the filters will be available in forms immediately but you need to enable it in the Entries Report page:

but you need to enable it in the Entries Report page:

create the file
Create the file
`resources/views/vendor/zeus/filament/pages/reports/entries-pro.blade.php`
or copy it from the vendor folder
and add the content:
Expand Down
20 changes: 10 additions & 10 deletions docs/bolt-pro/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ weight: 2

## Available Fields

- 🔥 Rating. Show Star Rating as field
- 🔥 Matrix Grid. multiple choice grid field as radio or checkboxes
- 🔥 Slider. a range selector, set the min and max value
- 🔥 Advance Date. set the date picker to range, month, week, and multiple dates
- 🔥 Alert. show a note with customized styling
- 🔥 Icon Picker. allows your users to pick an icon
- 🔥 Image Picker. allows users to pick an image from uploaded set
- 🔥 Dynamic Textbox. add multiple text values
- 🔥 Signature. collect users signature
- 🔥 terms and conditions. let the users agree to your terms and conditions
- 🔥 Rating - Show Star Rating as field
- 🔥 Matrix Grid - Multiple choice grid field as radio or checkboxes
- 🔥 Slider - A range selector, set the min and max value
- 🔥 Advance Date - Set the date picker to range, month, week, and multiple dates
- 🔥 Alert - Show a note with customized styling
- 🔥 Icon Picker - Allows your users to pick an icon
- 🔥 Image Picker - Allows users to pick an image from uploaded set
- 🔥 Dynamic Textbox - Add multiple text values
- 🔥 Signature - Collect users signature
- 🔥 Terms and conditions - Let the users agree to your terms and conditions
8 changes: 4 additions & 4 deletions docs/bolt-pro/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ To install bolt, you only need to require it in your composer by running the com
composer require lara-zeus/bolt-pro
```

make sure to clear the cache after the installation completed.
Make sure to clear the cache after the installation completed.

and that is all :).
And that is all :).

you will get more details after you purchasing the package.
You will get more details after you purchasing the package.

## Configuration

add these configuration keys to `zeus-bolt` config file:
Add these configuration keys to `zeus-bolt` config file:

```php
// if you want to disable the preset button
Expand Down
6 changes: 3 additions & 3 deletions docs/bolt-pro/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Available Preset: Support Ticket, Contact Form.

## Create a new preset

use the artisan command to create new preset:
Use the artisan command to create new preset:

`make:zeus-preset`

this will prompts you to enter the preset class name without any namespace
This will prompts you to enter the preset class name without any namespace
or the form ID from you existing forms.

all new generated presets will be saved in the folder: `App\Zeus\Presets`
All new generated presets will be saved in the folder: `App\Zeus\Presets`

8 changes: 4 additions & 4 deletions docs/bolt-pro/share-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Bolt Pro will provide your users with a new tab, that let them share the form to
To customize the social media sharing icons or use any other widget, create the file:
`resources/views/vendor/zeus/filament/social-share.blade.php`.

and add any social platform you want.
And add any social platform you want.

## Embedding a Form

the embed forms will be accessible from the route name `bolt.form.embed`
The embed forms will be accessible from the route name `bolt.form.embed` and
the url is; `/bolt/embed/$form->slug`

to customize the layout you can create the file:
To customize the layout you can create the file:
`resources/views/vendor/zeus/filament/embed-layout.blade.php`

the default content:
The default content is:

```html
<!DOCTYPE html>
Expand Down
10 changes: 5 additions & 5 deletions docs/getting-started/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ weight: 6

## Compiling assets

we use [tailwind Css](https://tailwindcss.com/) and custom themes by filament, make sure you are familiar with [tailwindcss configuration](https://tailwindcss.com/docs/configuration), and how to make custom [filament theme](https://filamentphp.com/docs/2.x/admin/appearance#building-themes).
We use [tailwind Css](https://tailwindcss.com/) and custom themes by filament, make sure you are familiar with [tailwindcss configuration](https://tailwindcss.com/docs/configuration), and how to make a custom [filament theme](https://filamentphp.com/docs/2.x/admin/appearance#building-themes).

### Custom Classes:
### Custom Classes

You need to add these files to your `tailwind.config.js` file in the `content` section.

Expand All @@ -33,19 +33,19 @@ content: [

### Customizing the Frontend Views

first, publish the config file:
First, publish the config file:

```php
php artisan vendor:publish --tag=zeus-config
```

then change the default layout in the file `zeus.php`:
Then change the default layout in the file `zeus.php`:

```php
'layout' => 'components.layouts.app',
// this is assuming your layout on the folder `resources/views/components/layouts/app`
```
this will give you full control for the assets files and the header and the footer.
This will give you full control for the assets files and the header and the footer.


If needed, you can publish the blade views for all zeus packages:
Expand Down
Loading

0 comments on commit a5fd917

Please sign in to comment.