Anton Komarev
Anton Komarev
This will require to change signature to `public function setData(?ElementInterface $element)` what will lead drop PHP7.0 support. Because nullable types are available since PHP7.1 only.
By this way you will only be able to do `$document->setData();` but not `$docuemnt->setData(null)`. Try it yourself.
Before implement any of proposed ways we need to define concrete use case for it.
Thanks for sharing, @piotrgolasz. But it's a bit different. Because you have only one model type. And I have serializer for each endpoint, which completely describes how it should be...
By the way, I've implemented polymorphism in my project. I want to test it in production in next couple of months. I'll make a PR with this changes if everything...
@tobscure this code is working in 2 of my projects on production for a one year. It's not fully covered with tests, but I've added some major ones. I will...
Hey, @mbryne! This is interesting case. I haven't thought about it before. Need to dive deeper in it. I have not much free time right now, but I'll try to...
Hey @zachisit! `getLoveReacter()` and `getLoveReactant()` is a low level methods, you can use facades to make your code cleaner. - https://laravel-love.readme.io/docs/reacter-facade - https://laravel-love.readme.io/docs/reactant-facade ```php $user->viaLoveReacter()->reactTo($product, 'Like'); ```
`$model->likeBy($user->id)` this is an old legacy API that had limited functionality and was replaced with a new architectural solution.
Take a look in `love_reactant_reaction_totals` and `love_reactant_reaction_counters` tables. If there are values with valid counts? Those values updates asynchronously: https://laravel-love.readme.io/v8/docs/aggregation-queue