You have a typo in your import, this:
use App\Models\Qoute;
Should be this:
use App\Models\Quote;
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
im new to laravel 8 and i spent hours searchin to solve this problem but failed :<
this is the error :
Error Class 'App\Http\Controllers\Quote' not found http://qoutes.test/
QouteController.php:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Qoute;
class QouteController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$quotes = Quote::all();
return view('index',compact('quotes'));
}
}
Qoutes.php:
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Quote extends Model
{
use HasFactory;
public function author()
{
return $this->belongsTo('App\Author');
}
}
You have a typo in your import, this:
use App\Models\Qoute;
Should be this:
use App\Models\Quote;
Please or to participate in this conversation.