File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -45,3 +45,49 @@ It will do the following:
4545- Replace the ` up ` method with ` __invoke ` if the class does not have a ` down ` method
4646- Replace named classes with anonymous ones
4747- Create a configuration file according to the data saved in your project
48+
49+ > Note
50+ > If you used inheritance of actions from other actions, then you will need to process these files manually.
51+
52+ ### Configuration
53+
54+ Publish the config file and migrate the settings from the ` config/database.php ` file.
55+
56+ ``` bash
57+ php artisan vendor:publish --provider=" DragonCode\LaravelActions\ServiceProvider"
58+ ```
59+
60+ ### Actions Location
61+
62+ Move the action files to the ` actions ` folder in the project root, or update the ` actions.path ` option in the configuration file.
63+
64+
65+ ### Parent Namespace
66+
67+ Replace ` DragonCode\LaravelActions\Support\Actionable ` with ` DragonCode\LaravelActions\Action ` .
68+
69+ ### Anonymous Classes
70+
71+ Replace named calls to your application's classes with anonymous ones.
72+
73+ For example:
74+
75+ ``` php
76+ // before
77+ use DragonCode\LaravelActions\Support\Actionable;
78+
79+ class Some extends Actionable {}
80+
81+ // after
82+ use DragonCode\LaravelActions\Action;
83+
84+ return new class () extends Action {};
85+ ```
86+
87+ ### Invokable Method
88+
89+ If your class does not contain a ` down ` method, then you can replace the ` up ` method with ` __invoke ` .
90+
91+ ### Changed Migration Repository
92+
93+ Just call the ` php artisan migrate ` command to make changes to the action repository table.
You can’t perform that action at this time.
0 commit comments