File tree Expand file tree Collapse file tree 2 files changed +8
-24
lines changed
src/Filament/Resources/LayoutResource/Pages Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -3,28 +3,5 @@ title: Upgrade
33weight : 6
44---
55
6- to upgrade to v3 , the name and the name space changed from ` Rain ` to ` DynamicDashboard `
6+ to upgrade to v4 , the name and the name space changed from ` Rain ` to ` DynamicDashboard `
77
8- 1- so first publish the config:
9-
10- ``` bash
11- php artisna vendor:publish --tag=zeus-dynamic-dashboard-config
12- ```
13-
14- this will crate the new config file ` zeus-dynamic-dashboard.php ` , and you can move your configuration from the old file ` zeus-rain `
15-
16- 2- change the call in the ` plugins ` array in your panel provider
17-
18- ``` php
19- DynamicDashboardPlugin::make()
20- ```
21-
22- 3- run the update script, since the namespace has changed, you need to run this command in the production to update the class names
23-
24- > make sure to backup your database
25-
26- ``` bash
27- php artisan dynamic-dashboard:update-class
28- ```
29-
30- this will change ` LaraZeus\Rain ` to ` LaraZeus\DynamicDashboard `
Original file line number Diff line number Diff line change 88class CreateLayout extends CreateRecord
99{
1010 protected static string $ resource = LayoutResource::class;
11+
12+ protected function mutateFormDataBeforeCreate (array $ data ): array
13+ {
14+ $ data ['user_id ' ] = auth ()->user ()->id ;
15+
16+ return parent ::mutateFormDataBeforeCreate ($ data );
17+ }
1118}
You can’t perform that action at this time.
0 commit comments