FrittenKeeZ / laravel-vouchers

Voucher system for Laravel 9+
MIT License
55 stars 15 forks source link

withEntities not verified in Redeem or Check #2

Closed martianatwork closed 4 years ago

martianatwork commented 5 years ago

I love this package and the way developed it <3.

My current issue is I want to associate a user with a voucher but theres no way to verify that, Im not sure how to get the current redeemer which is being processed in the Observer.

Voucher::redeeming(function (Voucher $voucher) { // Do some fancy checks here. return false; });

this returns $voucher but the $voucher->redeemers return data from the DB.

I would love it if we can implement this feature in the package itself and provide a run time option to bypass this check.

FrittenKeeZ commented 4 years ago

Hey @martianatwork,

Thanks for the good feedback! This is very similar to #1 which isn't possible at the moment, but I have an idea to make it work.

FrittenKeeZ commented 4 years ago

This will be possible when 0.1.6 is published on Packagist.

martianatwork commented 4 years ago

You are awesome! Thank you.