Ad

Class 'App\Http\Controllers\User' Not Found

- 1 answer

I'm a beginner at laravel and have been facing this error

Here's My Controller:-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ProfilesController extends Controller
{
    public function index()
    {
      $user = User:: findOrFail($user);
      return view('confession')->with('user',$user);

    }
}

Please Help And Thanks

Ad

Answer

you are missing to include your model at the top use App\User;

Ad
source: stackoverflow.com
Ad