Я написал тест, который создает запись в таблица и проверяет наличие записи:
Код: Выделить всё
$this->assertDatabaseHas('my_table', [
'id' => $newRecord->getKey(),
'id_user' => $id_user,
'quantity' => (float)$quantity,
'id_action' => 5,
]);
Код: Выделить всё
Failed asserting that a row in the table [my_table] matches the attributes {
"id_user": 6166,
"quantity": 10,
"id_action": 5,
"params": "{\"id_sale_bid\":2040}"
}.
Found similar results: [
{
"id_user": 6166,
"quantity": "10.000",
"id_action": 5,
"params": "{\"id_sale_bid\": 2040}"
}
]
Подробнее здесь: https://stackoverflow.com/questions/785 ... ase-column