1
Create a Custom Strategy
Create a class implements the
Strategy
interface.
Doing so by extending the Extractor
class is a good starting point for custom strategies as it contains some useful methods that you probably don’t want to implement yourself.2
Implement the Strategy
Implement your strategy in the
run()
method, which takes the artifacts as an array.The array
that the run method returns is used as the final output data.3
Register the Strategy
Call
Magic::registerStrategy('my-custom-strategy', MyCustomStrategy::class)
in your boot()
method in the service provider.Next Steps
Learn how to extract some data
Step by step guide to extract data from documents using Data Wizard.