vd/app/Core/Model.php
2018-11-06 16:07:41 +08:00

37 lines
643 B
PHP

<?php
namespace App\Core;
use Dipper\Foundation\Core\Model as Eloquent;
/**
* Base Model.
*/
abstract class Model extends Eloquent
{
protected $guarded = [];
/**
* 模型的「启动」方法
*
* @return void
*/
protected static function boot()
{
parent::boot();
}
public function attributesToArray()
{
$attributes = parent::attributesToArray();
foreach ($attributes as $key => $value) {
if (is_numeric($value) && $value > 4294967295) {
$attributes[$key] = (string) $value;
}
}
return $attributes;
}
}