mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
Refactoring user permissions
This commit is contained in:
@@ -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)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user