Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Command to use App\Models\LogsActivity trait on all models #24

Open
tabacitu opened this issue Aug 31, 2023 · 0 comments

Comments

@tabacitu
Copy link
Member

tabacitu commented Aug 31, 2023

Upon installing this package, if I haven't already installed and set up spatie/laravel-activitylog, I want this package to make it easier for me to implement the most common scenario.

I want to run php artisan backpack:activity-log:inject-model-trait, and it will go through all models in App\Models and inject that trait.

Possible attributes:

  • php artisan backpack:activity-log:inject-model-trait --trait='App\Models\Traits\DifferentTrait'
  • php artisan backpack:activity-log:inject-model-trait --model-path='App\DifferentModelsPath\'
  • php artisan backpack:activity-log:inject-model-trait --ask - would ask me for each model, if I want to add yes/no

That would make it MUCH simpler to use spatie/laravel-activitylog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant