opxcore/authorization-interface

OpxCore 授权接口。

1.0.2 2020-07-02 08:23 UTC

This package is auto-updated.

Last update: 2024-09-29 05:42:47 UTC


README

AuthorizationInterface 是授权检查的抽象。检查器必须返回 AuthorizationResponse

$actions=['update'];

$response = AuthorizationInterface::check([...$permissions], $actions);

if($response->can('update') {
    // Do some update actions
}