As how you do in laravel, you can run vendor:publish to modify elefilter configs.
There are 5 configs for elefilter package.
1. Main Namespace of filter class directory
'namespace' => 'App/Filters'
1. Usually you don't have to change the App, but if you want to have a directory inside app folders other than Filters, you can set it. This will be the main root of filter classes holder
'path' => 'app/Filters'
2. The path key should be compatible with namespace, If you have changed the namespace, be careful to change path according to namespace too
'full_path' => base_path('app/Filters')
3. This config added to make the package testable easily. The path you set to base_path method should be compatible with the path config value
'suffix' => 'Filter'
4. When you create a filter class with name of Status for example, the suffic will be added automaticaly to end of it, you can change it to whatever you want. If you dont want suffix, just leave it to ""
'method' => 'apply'
5. When creating class filter that needs passing argument, the method name comes from this config. For example for a SearchFilter class, you should define a method with this name, apply, otherwise that wont work. If you want to use another name , you can change the config and change the method name in class
We suggest using default configs
© 2025 elefilter