Skip to content

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

Open
@tabacitu

Description

@tabacitu

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions