2

I'm creating some packages based on DDD. Each domain going into its own package.

I also want to prefix each package tables with certain prefix so that they are sorted in phpMyAdmin.

I know I can change config.php of my host app. But that's not what I want.

This is a sample of the result I'm searching to get in phpMyAdmin

auth_users
auth_roles
auth_tokens
auth_user_roles
sales_leads
sales_campaigns
sales_conversions
ticketing_tickets
ticketing_posts
ticketing_attachments
...

And I have auth, sales, ticketing and other packages.

How can I do that?

1 Answers1

1

There is no way to directly do that in Laravel.

You can have several db_connection with diferrent prefix but not sure it helps your requirement.

To, as best, answer your need, I should create a "sql view" to each table with the desired name.

CREATE VIEW auth_users AS SELECT * FROM users;

...

Dri372
  • 1,275
  • 3
  • 13