As of the writing of this, Laravel Jetstream doesn’t allow you to invite users who are not already registered. See GitHib issue #228 for more details.
Here’s how I did it.
$ php artisan make:model -a Invitation
The Invitation model will be attached to a User (the one who is sending the invite) and a Team. It will also use Jetstream’s built-in role
feature.
2. Next, edit migration file: create_invitations_table.php
<?phpuse Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;class CreateInvitationsTable extends Migration { /** * Run the migrations. * * @return…
UPDATE: After building this, I learned more about InertiaJS and realized it’s very similar (plus, it’s way more popular/supported). I’d recommend checking it out. 😉
This all began after reading this article which questions the usage of single-page applications (SPAs) and APIs for the modern web:
Read that 👆🏾 (and a popular response), if you want.
As I read, I realized that writing APIs for SPAs isn’t very fun. Like when I need five or more API endpoints on the backend with all their associated actions and mutations for state management on the frontend—all for just one page!
Is there…
I actually launched a startup from scratch in 24 hours! I learned (more than) a few things along the way, and I’d love to share them with you!
But, before we go any further, I have to answer the two questions I’m sure most of you (including my own wife) are wanting to ask…
I love helping people build amazing websites and applications. One thing I pride myself on is being able to prioritize what’s most important and launch the thing. …
Passionately empowering people and their ideas to reach their full potential through design, internet technology, and marketing