T
T
theEternalStudent2015-10-20 12:26:47
Laravel
theEternalStudent, 2015-10-20 12:26:47

How to get simple array result using database query in laravel?

How to get simple array result using database query in laravel? Those. how to write a request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-10-20
@theEternalStudent

If you're using the Query Builder, then it returns an array of StdClass objects.
If you're using Eloquent, then selects return collections, and collections have a toArray method .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question