- 直接修改模型名称从User ->AdminUser
class AdminUser extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
2.通过创建alter_users_table修改数据库中的表名
class AlterTableUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::rename('users','admin_users');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
3.执行 php artisan migrate 操作更新数据库
4.修改conf