Level 60
https://laravel.com/docs/5.8/database-testing
public function testDatabase()
{
// Make call to application...
$this->assertDatabaseHas('posts', [
'txx' => 'trinity-rank',
'code' => 200,
]);
}
1 like
How to test DB:table, create factory, without model ?
$post= DB::table('posts')->insert([
'txt' => 'htyehytyteh',
'code' => 200,
]);
Please or to participate in this conversation.