改进
This commit is contained in:
parent
4b5ba18b29
commit
c2894f5114
@ -52,8 +52,10 @@ protected static function boot()
|
|||||||
$model->api_token = Str::random(60);
|
$model->api_token = Str::random(60);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果结尾有 / 则去掉
|
// 如果设置了 url 并且结尾有 / 则去掉
|
||||||
|
if ($model->url) {
|
||||||
$model->url = rtrim($model->url, '/');
|
$model->url = rtrim($model->url, '/');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
static::updating(function (self $model) {
|
static::updating(function (self $model) {
|
||||||
// 如果结尾有 / 则去掉
|
// 如果结尾有 / 则去掉
|
||||||
|
Loading…
Reference in New Issue
Block a user