Class ‘App\Http\Controllers\Redirect’ Not Found In Laravel


In this tutorial, we learn Class ‘App\Http\Controllers\Redirect’ not found in Laravel. The Redirect variable is a uses Redirect some url, you need to Redirect library. 

If you faced this problem so go to your page and find use session under namespace.

Class ‘App\Http\Controllers\Redirect’ Not Found In Laravel-Step By Step

If you are getting error like Class ‘App\Http\Controllers\Redirect’ not found on controller in laravel.

So, add use Redirect; at the top of your controller file along with other prefixes:

use Redirect;
Example:

Then YourController.php file, add use Redirect; at the top of your controller a file like the following:

<?php 
namespace App\Http\Controllers;
 
use Illuminate\Http\Request;
 
use Redirect;
 
class YourController extends Controller
{
    public function index(Request $request)
    {
        //your code
    }
 
}

I hope it can help you...

Leave a Reply

Your privacy will not be published. Required fields are marked *

We'll share your Website Only Trusted.!!

close