-
-
Notifications
You must be signed in to change notification settings - Fork 58
Feature request: configurable base feature & job class #9
-
Hi, it would be really nice to be able to set a default base feature and job classes in the config file.
Right now when you generate a new feature, it extends the Lucid\Foundation\Feature and when you generate a new job class it extends the Lucid\Foundation\Job class.
In my case, I have a base feature class that extends Lucid\Foundation\Feature and every new feature extends my base class because of some common functionalities. The same applies to job classes. The problem I have is it's very annoying to manually set base class every time I generate a new feature of job class.
You can also suggest a different approach on how to handle this challenge if there is one.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
Interesting suggestion!
Would something like lucid make:feature MyFeature --base=App\Features\BaseFeature work for you? I'm considering adding this to get you rid of this inconvenience.
Beta Was this translation helpful? Give feedback.
All reactions
-
this is better than putting in manually, but it would be even better if make:feature command would get the base class from the config file. Usually, you don't want to have many different base classes so it would be more practical to set it only once and then forget about it, or else you would have to write the full namespace every time you would make a new feature or job.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Love this idea and it's been added to the roadmap 👍
Beta Was this translation helpful? Give feedback.