@darrion.kuhn
To redirect to a separate folder in Laravel, you can use the Redirect
facade provided by Laravel.
Here's a step-by-step guide on how to redirect to a separate folder:
1
|
Route::get('/redirect-to-folder', 'RedirectController@redirectToFolder'); |
1
|
php artisan make:controller RedirectController |
1 2 3 4 5 6 7 8 9 10 11 12 |
namespace AppHttpControllers; use IlluminateHttpRequest; use IlluminateSupportFacadesRedirect; class RedirectController extends Controller { public function redirectToFolder() { return Redirect::to('/folder-name'); } } |
Make sure to replace folder-name
with the actual folder you want to redirect to.
That's it! You have successfully redirected to a separate folder in Laravel.