Level 56
@reyeshatrinak what do you mean need to redirect the Dashboard page? in test?
Maybe you want to visit the page and check if user redirected to ligin page? Like
$this->get('/dashboard')
->assertRedirect('login');
I'm trying to write a test command in Laravel 9. In the below code the new user will create successfully But after creating need to redirect the Dashboard page
public function test_an_action_that_requires_authentication() { $user = $this->artisan('make:user',[ 'name' => "username", 'email' => "useremail", 'password' => Str::random(8) ]); } How to redirect to the route after success created
Please or to participate in this conversation.