Replies: 2 comments
-
Hey @goellner! I think this is something that could potentially be pretty cool! 😄 However I'm a bit worried that it might be out of the scope of the package and add more complexity for me to maintain. I think this might be something that would be better to implement in the app code rather than in the package code (at least for the time being). If enough people think this would be useful though, this is something I'll definitely consider adding in the future 🙂 |
Beta Was this translation helpful? Give feedback.
-
thank you for the quick response. an alternative idea: maybe an easier route would be to add a |
Beta Was this translation helpful? Give feedback.
-
It would be amazing, if we could overwrite the models. For example iI would need to add more columns to the
ShortURLVisit
.Maybe add it to the config as described here: https://freek.dev/2442-strategies-for-making-laravel-packages-customizable
Let me explain my example a bit more: Would need to add a custom column called
type
which would just be a string/enum column with lets sayqr
andlink
values. My target url would include a query param?type=qr
and this should be tracked in the short_url_visits.type column.By using my own model i can add the column to the fillable properties. The next bit that would need customising is the
trackVisit
function in the Resolver.Beta Was this translation helpful? Give feedback.
All reactions