Laravel 4中所有Eloquent模型的示例都扩展了Eloquent,但是当您在Laravel 5中生成模型时,它说扩展了Model,它们是一样的吗?
Laravel 4
<?php
class User extends Eloquent {
//Code
}
Laravel 5
<?php
class User extends Model {
//Code
}
Laravel 5文档说:
定义雄辩的模型
class User extends Model {}