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

In this tutorial, we learn Class ‘App\Http\Controllers\Validator’ not found in Laravel. The Validator variable is the global variable and uses Validator, you need to Validator library. In laravel Validator need form validate in laravel.

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

Class ‘App\Http\Controllers\Validator’ Not Found-Step By Step

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

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

use Validator;

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

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
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.!!