{"repo":"clarkeash/doorman","free":true,"listed":false,"github":"https://github.com/clarkeash/doorman","clone":"git clone https://github.com/clarkeash/doorman.git","description":"Limit access to your Laravel applications by using invite codes","language":"PHP","stars":1044,"topics":["php","laravel","laravel-package","doorman","invite"],"license":"MIT","category":"databases-storage","readme_excerpt":"Doorman Doorman provides a way to limit access to your Laravel applications by using invite codes. Invite Codes: Can be tied to a specific email address. Can be available to anyone (great for sharing on social media). Can have a limited number of uses or unlimited. Can have an expiry date, or never expire. Laravel Support Laravel Doorman :--------- :---------- 5.x 3.x 6.x 4.x 7.x 5.x 8.x 6.x 9.x 7.x 10.x 8.x 11.x 9.x 12.x 10.x Installation You can pull in the package using composer: Next, migrate the database: Usage Generate Invites Make a single generic invite code with 1 redemption, and no expiry. Make 5 generic invite codes with 1 redemption each, and no expiry. Make an invite with 10 redemptions and no expiry. Make an invite with unlimited redemptions and no expiry. Make an invite that expires on a specific date. Make an invite that expires in 14 days. Make an invite for a specific person. Alternatively instead of calling make() which will return a collection of invites you can call once() if you only want a single invite generated. Redeem Invites You can redeem an invite by calling the method. Providing the invite code and optionally an email address. If doorman is able to redeem the invite code it will increment the number of redemptions by 1, otherwise it will throw an exception. is thrown if the code does not exist in the database. is thrown if an expiry date is set and it is in the past. is thrown if the invite code has already been used the maximum number of times. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/clarkeash","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/clarkeash/doorman/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}