📌  相关文章
📜  创建角色 spatie - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:53.438000             🧑  作者: Mango

代码示例2
// Create a role or permission if necessary
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;

$role = Role::create(['name' => 'writer']);
$permission = Permission::create(['name' => 'edit articles']);