Closed vesper8 closed 6 years ago
This is easily remedied with
if(!$invite = Invite::where("for", $user->email)->first()) {
$invite = \Doorman::generate()->for($user->email)->make();
}
ddd($invite);
Just thought it would be nice to have it built-in
Hey, this is fixed. Sorry it took so long I havent had much time to work on open source lately. I should be tagging 2.0 later today with this fix in (will require laravel 5.6 and php 7.1)
I just noticed that there is nothing to prevent creating two codes for the same email
generates two rows and two codes
Would be nice if this instead threw an exception "code for email already exists"