clarkeash / doorman

Limit access to your Laravel applications by using invite codes
https://packagist.org/packages/clarkeash/doorman
MIT License
1.02k stars 45 forks source link

Redeem and return redeemed invite #77

Closed issa closed 2 years ago

issa commented 2 years ago

I have implemented my own Driver and Invite class which are working well.

In my use case I would like to get the Invite instance after Doorman::redeem. Is there an easy way to get this working without me implementing my own Doorman class as well?

clarkeash commented 2 years ago

The Invite class is just a model so I assume by implementing your own you have a class that extends BaseInvite in which case you can just query as normal e.g. YourInviteModel::where('code', '=', 'some-code')->first(); etc.

Does that help?

issa commented 2 years ago

Ok, that was my Plan B. So I will just #redeem and than the Invite of the same code.

Perhaps you are considering to return the redeemed Invite in a future release?