Refactoring user permissions

This commit is contained in:
xiaomlove
2022-08-20 19:11:28 +08:00
parent 3046837576
commit b79762686a
73 changed files with 945 additions and 326 deletions

View File

@@ -25,4 +25,15 @@ abstract class BasePlugin extends BaseRepository
Artisan::call($toExecute);
}
}
public function checkMainApplicationVersion()
{
$constantName = "static::COMPATIBLE_VERSION";
if (defined($constantName) && version_compare(VERSION_NUMBER, constant($constantName), '<')) {
throw new \RuntimeException(sprintf(
"NexusPHP version: %s is too low, this plugin require: %s",
VERSION_NUMBER, constant($constantName)
));
}
}
}