Refactor your code to use to_action(), to_route(), assertRedirectToRoute(), and assertRedirectToRoute(). These modernize your Laravel applications, as well as streamline compound statements to improve readability.
Before
redirect()->route('post.show', $request->query('id'));Redirect::action('PostController@show', $id); $response->assertRedirect(route('post.show', $id));$response->assertRedirect(action('PostController@show', $id));
After
to_route('post.show', $request->query('id'));to_action('PostController@show', $id); $response->assertRedirectToRoute('post.show', $id);$response->assertRedirectToAction('PostController@show', $id);
Sign in with any of the following services to connect Shift with your Laravel project.
Don't use one of these services?
Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.