waxim/woodhouse
Composer 安装命令:
composer require waxim/woodhouse
包简介
Woodhouse is a postgress user management lib for php.
README 文档
README
“There is no surer foundation for a beautiful friendship than a mutual taste in literature.” ― P.G. Wodehouse
Woodhouse is a very simple PHP library for managing users on a postgresql database. It allows you to create/delete users and given them table specific permissions. Woodhouse requires laravels illuminate/database package (there for works natively with laravel).
Example
$woodhouse = (new Woodhouse);
$woodhouse->user()->create(($username = 'testing'), ($password = 'testing'));
// ... create a table
# Then give the user permissions to the table
$woodhouse->user()->allow(($username = 'testing'), ($table = 'table_name'));
# Or take the permission away again
$woodhouse->user()->deny(($username = 'testing'), ($table = 'table_name'));
# Delete the user
$woodhouse->user()->delete(($username = 'testing'));
# We can even test if a user has permissions to a table
$woodhouse->user()->has(($username = 'testing'), ($table = 'table_name'));
# We can also get a list of all our tables
$tables = $woodhouse->user()->table()->list();
foreach($tables as $table) {
echo $table->tablename;
}
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-07