Use Stubs to Set the Tenant ID

Written by Laracasts / Original link on Oct. 13, 2020

All data must be associated with a tenant in our database. We can use the new stub publishing feature that was introduced as part of Laravel 7 to allow for this. This will ensure that tenant ids are added to each model and set whenever data is created.


« Courtesy of Justin P. - Lack of Problem Is the Problem »