T
T
Twelfth Doctor2017-05-08 08:45:02
Laravel
Twelfth Doctor, 2017-05-08 08:45:02

Select multiple rows that match a condition. String or array?

Hello! Please tell me - if I execute such a query to the database, and several rows are found in the table that satisfy the condition, then in $aliases I will have an object with a string containing all the necessary mainnames or an array with them?

$aliases = Capsule::table('domains')
    ->where ('vhost' , $vhostid)
    ->select('mainname')
    ->get();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-05-08
@verdex

Everything is written in the documentation. https://laravel.ru/docs/v5/queries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question