Home > Backend Development > PHP Tutorial > laravel uses orm+query construction to represent concat

laravel uses orm+query construction to represent concat

PHP中文网
Release: 2016-08-18 09:15:46
Original
2300 people have browsed it


Question:
I hope to use Laravel’s ORM and query construction (without using raw native SQL statements) to use a concat SQL statement like this: select a,b,concat(a,b) from table, but it seems that it is not found. For relevant methods to express such sentences, please ask experts who have experience in this field. It is in the following format:

Table::where(...)->get();
Copy after login

Reply content:

Question:
I hope to use laravel’s ORM and query construction (without raw native SQL statements) to use concat SQL statements like this: select a,b, concat(a,b) from table, but I found that there seems to be no relevant method to express such a statement. I would like to ask someone who has experience in this area for advice. It is in the following format:
Table::where(...)->get();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template