F
Filament15mo ago
daisy21

SETTING MULTIPLE DATABASE FILAMENT

is it possible to use 2 different database for a filament project? ex : i have a filament project A and B now i want to make filament B have its own DB but still uses A's to view some of its tables. can filament understand which connection the model uses if i use this in the model? . protected $connection = 'mysql2';
Solution:
yes if you didn't define the connection it will use the default mysql
Jump to solution
5 Replies
Lara Zeus
Lara Zeus15mo ago
"can filament understand " yes it should work
daisy21
daisy21OP15mo ago
do i need to define $connection on each model now? or it will use default 'mysql' if i dont define the $connection var
Solution
Lara Zeus
Lara Zeus15mo ago
yes if you didn't define the connection it will use the default mysql
daisy21
daisy21OP15mo ago
thanks will mark as solved for now
Want results from more Discord servers?
Add your server