Explain how to do 301 redirects in laravel?



Explain how to do 301 redirects in laravel?..

Answer / Prashant Kumar Tripathi

To perform a 301 redirect in Laravel, you can use the Redirect class from the Http response. Here's an example of redirecting to another URL with a status code of 301 (permanent redirect).nn```phpnreturn Redirect::away('http://new-url.com', 301);n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How to create custom middleware in laravel?

1 Answers  


What is laravel dusk?

1 Answers  


In laravel, what is fillable attribute in a model?

1 Answers  


What is a Terminable Middleware ?

1 Answers  


Tell me how do I see all of the routes that are defined?

1 Answers  


How to extend login expire time in auth?

1 Answers  


In which folder robot.txt is placed?

1 Answers  


Explain faker in laravel.

1 Answers  


What is service providers?

1 Answers  


What is the difference between print_r and var_dump?

1 Answers  


What do you mean by eloquent used in laravel 5?

1 Answers  


How to make a helper file in laravel?

1 Answers  


Categories