You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
655 B
33 lines
655 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Encore\Admin\Auth\Database\Administrator;
|
|
use Encore\Admin\Form;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AdminUser extends Administrator
|
|
{
|
|
public static function boot()
|
|
{
|
|
parent::boot();;
|
|
|
|
self::saving(function () {
|
|
|
|
if (app()->environment('dev')) {
|
|
|
|
throw new \Exception('开发环境不允许操作');
|
|
}
|
|
});
|
|
|
|
|
|
self::deleting(function () {
|
|
|
|
if (app()->environment('dev')) {
|
|
|
|
throw new \Exception('开发环境不允许操作');
|
|
}
|
|
});
|
|
}
|
|
}
|