I try to use Laravel and follow the official Laravel Eloquent documentation and several tutorials in reliable tuts plus sources
I created a model inside the application / models called Stack with a table in the database called stacks with a primary key column called id, which corresponds to the default values of Laravels.
<?php (Stack.php)
class Stack extends Eloquent
{
}
$stacks = Stack::all();
However, when I run this model, I get the following error message.
Fatal error: Class 'Eloquent' not found in C:\www\laravelproject\app\models\Stack.php on line 4
Including official documentation and authoritative study guides, I also looked through 2 youtube tutorials, and it seems that there is no additional startup / including / requiring a mandatory declaration in any new specific model, so I assume there may be something else wrong.
, ? , ?
laravel.phar laravel .bat . ( )
, / .
- Eloquent \laravel\framework\src\Illuminate\Database\Eloquent
- , app/config/app.php. 'Eloquent' = > 'Illuminate\Database\Eloquent\Model'
- , \Illuminate\Database\Eloquent\Model, , \Illuminate\Database\Eloquent\Model, Eloquent
- Laravel\vendor\laravel\framework\src\Illuminate\Database\Eloquent, \laravel\framework\src\Illuminate\Database\Eloquent ..... ....
- , composer create-project laravel/laravel -prefer-dist, , , 100%, , . /User.php , previuos ( laravel.phar).
.