I want to use Query Builder because my project have many tables in the database, is it necessary to use Model if I use Query Builder?
Base in the article below, the Query Builder is much faster in processing in large scale of project.
I want to use Query Builder because my project have many tables in the database, is it necessary to use Model if I use Query Builder?
Base in the article below, the Query Builder is much faster in processing in large scale of project.
You won't have to use Model if you're using Query Builder.
Let's say you have a table named 'users' in your database. Just use it as below:
$users = DB::table('users')->select('loginname');
As mention by @kurapika, When using Query Builder, you do not need to use the Model. For example, with Model
$users = Users::get(['first_name']);
And using the query builder
$users = DB::table('users')->get(['first_name']);
There is no best choice. It depends solely on your need.