Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Tenancy for Laravel – tinker throws up migration files when creating a new tenant

I’ve taken over a project from a prev dev, and I’m trying to understand the tenancy for laravel package, we’ve past the point of no return on the project to use a new package and to be fair the package and domain is working well for the created subdomain put in by the previous dev, but when I use tinker to create a new tenant and domain, as described in the quick start doc, tinker creates the db, creates the domain and tenant but it seems to fetch a migration file from one of the subdomains too? Anyone every came across this before?

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Some of your migration files have the same class name, which is not allowed.

Try using anonymous classes instead and you won’t run into this problem. This is possible since laravel 8.37

Instead of

class CreateAgreementSubTypesTable extends Migration { ... }

write

return new class extends Migration { ... }; // semi colon is important.
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading