What is the use of the Laravel query designer?

I am studying the use of Laravel 5, but I am at the stage of building a query, and after looking at the first code snippets, I think it is really useless when someone has basic knowledge of SQL.

Example:

$users = DB::table('users')
->select(DB::raw('count(*) as user_count, status'))
->where('status', '<>', 1)
->groupBy('status')
->get();

What is the purpose of studying the syntax of a query builder if a programmer has at least basic knowledge of the SQL language? Moreover, moving extended queries from pure SQL to builder function queries looks like a nightmare ...

+4
source share
1 answer

, , (, , , ?), . , , "" "" , - .

, , . SQL - , . , Laravel, , , .

, Eloquent . , , SQL . SQL.

+2

Source: https://habr.com/ru/post/1621295/


All Articles