Skip to content

Commit 10380b3

Browse files
committed
refactor namespace
1 parent 4c8817c commit 10380b3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/advanced/custom-designer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ weight: 7
55

66
## Use Custom Designer
77

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

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

15-
Copy the trait from `\LaraZeus\Bolt\Concerns` to your app, lets say: `\App\Zeus\Bolt\Concerns`
15+
Copy the class from `\LaraZeus\Bolt\Facades` to your app, lets say: `\App\Zeus\Bolt\Classes`
1616

17-
### Call the trait in a service provider
17+
### Call the class in a service provider
1818

1919
In your register method of your `AppServiceProvider` add the following:
2020

2121
```php
22-
\LaraZeus\Bolt\Filament\Resources\FormResource::getBoltFormSchemaUsing(fn(): array => \App\Zeus\Bolt\Concerns\Designer::getMainFormSchema());
22+
\LaraZeus\Bolt\Filament\Resources\FormResource::getBoltFormSchemaUsing(fn(): array => \App\Zeus\Bolt\Facades\Designer::getMainFormSchema());
2323
```
2424

2525
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.

src/Concerns/Designer.php renamed to src/Facades/Designer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace LaraZeus\Bolt\Concerns;
3+
namespace LaraZeus\Bolt\Facades;
44

55
use Filament\Forms\Components\Grid;
66
use Filament\Forms\Components\Section;
@@ -9,8 +9,6 @@
99
use Filament\Forms\Components\Wizard;
1010
use Filament\Forms\Components\Wizard\Step;
1111
use Filament\Forms\Get;
12-
use LaraZeus\Bolt\Facades\Bolt;
13-
use LaraZeus\Bolt\Facades\Extensions;
1412
use LaraZeus\Bolt\Models\Form;
1513
use LaraZeus\Bolt\Models\Section as ZeusSection;
1614

src/Livewire/FillForms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
use Illuminate\Support\Arr;
88
use Illuminate\Support\Facades\Mail;
99
use Illuminate\View\View;
10-
use LaraZeus\Bolt\Concerns\Designer;
1110
use LaraZeus\Bolt\Events\FormMounted;
1211
use LaraZeus\Bolt\Events\FormSent;
12+
use LaraZeus\Bolt\Facades\Designer;
1313
use LaraZeus\Bolt\Facades\Extensions;
1414
use LaraZeus\Bolt\Models\Form;
1515
use Livewire\Component;

0 commit comments

Comments
 (0)