Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
And you try to display the entire $model collection and you will immediately understand what's going on.
After all, there may be several rows in the table, where price = 100, this is the point, where returns an "array of arrays" in contrast to the find method (where id is unique).
$result = DB::table('arajin_models')->where('price','=',100)->get();
$model = $result[0];
echo $model->title;
# или
$model = DB::table('arajin_models')->where('price','=',100)->first();
echo $model->title;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question