This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello October community, I'm a bit stuck on something and I'd need some help.
Here's the idea: my background is mostly on frontend and I'm building a website where I would like to populate some data (html_color, brand, product, color_name,etc) from a factory database (MySql). The factory database is quite big, therefore I was given a list of queries suggestions to get only the fields I might want using some SELECT, FROM, WHERE and ORDER BY.
Is there a way to populate the fields of a plugin with data from an external Db?
I've seen stuff in the Doc about Seed and Route with with my limited knowledge in PHP/Laravel I'm not sure where to go about doing that. Watch&Learn youtube tutorial on Seeding with Faker seem close to what I want to do but using an external Db insteaf of Faker
Take a look at the builder plugin, it lets you build plugins and models easily with a user interface. It's a great place to get started if you can handle a bit of PHP.
I'd define the factory database as another entry in your config file and then use it as a model with the $connection
property.
1-2 of 2