Level 73
Check your env file and make sure you have configured the database.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i start a new project with
composer require nwidart/laravel-modules
have 1 modeule (User)
statrt to write test with Pest but i have this error
Call to a member function connection() on null
the pest code:
test('login success', function () {
$user = User::factory()->create([
'password' => 'password',
]);
$response = $this->postJson('/api/user/auth/login', [
'phone' => $user->phone,
'password' => 'password',
]);
$response->assertOk();
});
Please or to participate in this conversation.