How to get a Builder object from rows related to pivot - Laravel
问题 I'm trying to get all the "books" that one user have: but I can't do it how I need. I use the following code: /*Gets all books from the user whose id is 1*/ $books= User::find(1)->books(); That return to me an Collection object; but I need a Builder object, as I get when I use the "select" method. /* This code return me a "Builder" object */ Books::select(array('id', 'name', 'type')); I need the Builder instead of Collection because I using Bllim/Datatables on my project and this package just