11 months ago

Start new Query Builder on Model's table

Posted 11 months ago by RoboRobok

Hi guys,

is there any helper method to start new Query Builder on Model's table? I need to return some raw data to get a pure Collection, not Eloquent Collection of models.

In other words, I'm looking for a helper returning DB::table((new MyModel)->getTable()).

I know there's a query() method on Model, but it doesn't do that. It just starts new Eloquent Query.

Please sign in or create an account to participate in this conversation.