Friday, April 14, 2017

Laravel dynamic pivot table

In my app I use custom class for replicate tables during the tests. This class create new tables with _test postfix and tell eloquent to wrok with them. But when I work with many to many relations I need to specify pivot table name too. Is it possible to change pivot table during runtime application?



via Nitromoon

Advertisement