My select is returning the field and the value of the id that is in the table and I need to return only the value, how do I do it?
$id = DB::table('participantes')
->select('id')
->orderBy('id','DESC')
->take(1)
->get();
Error returned
SQLSTATE [22007]: Invalid datetime format: 1366 Incorrect integer value: '[{"id": 173}]' for column 'participant_id' at row 1 (SQL: insert intoparticipantes
(opcao_id
,% (%),questao_id
) values (291, 84, [{"id": 173}]))