Wednesday, March 8, 2017

what happend to getRelatedIds in Laravel 5.4

I was using this function in 5.3 and now when I try to use it in 5.4 like this:

$post->tags()->getRelatedIds(); 

I am getting errors that function does not exist, I checked the documentation for 5.4 and it's not there anymore.

Anyone knows why this usefull function was removed and what I can do to get all ids from related model?



via maxit

Advertisement