Start new Query Builder on Model's table

Posted 1 week 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.

Reply to

Use Markdown with GitHub-flavored code blocks.