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

Allow using the activity_model value in spaties base package config file #65

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

sidis405
Copy link
Contributor

There are cases when one would want to use a custom model as the Activity model.

Practical cases

  • i've disabled lazy loading and Activity is attempting to lazy load causer and subject
  • i need to set up a separate database connection for the Activity model as it will not be stored in the application's main database

The change is very similar to how Spatie themselves are using it in the base ActivityLog package.
Or rather: check if there's a configured model, otherwise use the default one.

@noxoua
Copy link
Owner

noxoua commented Feb 21, 2024

Thanks for the PR 🙏

@noxoua noxoua merged commit 26014be into noxoua:main Feb 21, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants