Thursday, March 30, 2017

Best way to access second model in Laravel

Let's say i have "Controller1 <-> Model1" and "Controller2 <-> Model2".

And i need with Controller1 get/update data of Model2. What way would be best to achieve this?

Controller1 can communicate directly with Model2.

or

Controller1 should communicate with Controller2 and Controller2 would get/update data of Model2?



via Linas Lg

Advertisement