I created a model called category.php as you can see in the code provided below:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Category extends Models
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'categories';
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $fillable = ['name',];
protected $hidden = [];
}
Now whenever i try to run my site i get this error:
FatalErrorException in category.php line 7:
Class 'App\Models\Models' not found
I dont know what i did wrong here all help would be appreciated.
Thanks in advance,
-Kevin