This lesson got separated as it's a crucial part of the application - sending out an invitation email to an employee and allowing them to register to the system:
In this lesson, we will do the following:
- Create Invitation Model and Database tables
- Modify UserResource Create button action - to invite the Employee
- Email the invitation to the Employee
- Create a custom page that will be signature (Laravel Signer URL) protected
- Create a custom registration form for the Employee
Create Invitation Model and Database tables
Let's create our migration:
Migration
Schema::create('invitations', function (Blueprint $table) { $table->id(); $table->string('email'); $table->timestamps();});
Then, we can fill our Model:
app/Models/Invitation.php
class Invitation extends Model{ protected $fillable = [ 'email', ];}
As you can see from the setup, it's a pretty basic Model. All we care about - is the email address being invited.
Modify UserResource Create Button Action - to Invite the Employee
Next on our list, we need to modify the User Create button. We don't want to create...