You would have school id and user id.
So you would not only check the authenticated user you would make sure the correct School also.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have been looking for information on how to create a multi-School Authentication system (similar to Multi-Vendor Auth) but am not really finding a lot of information on how to set it up. If anyone can suggest resources on this, I would be greatful. I want any school to be able to register and create their own list of teachers and students as well as other features. Thanks in advance.
@ErikRobles, the article? I believe he is running them via tinker...
>> $tenant1 = Tenant::create(['id' => 'foo']);
>> $tenant1->domains()->create(['domain' => 'foo.saas.test']);
>> $tenant2 = Tenant::create(['id' => 'bar']);
>> $tenant2->domains()->create(['domain' => 'bar.saas.test']);
>> App\Tenant::all()->runForEach(function () {
factory(App\User::class)->create();
});
He's just demo'ing creating tenants.
Please or to participate in this conversation.