namvoyager/simple-user-management
最新稳定版本:v1.0.1
Composer 安装命令:
composer require namvoyager/simple-user-management
包简介
User management.
关键字:
README 文档
README
Installation
Install using composer:
composer require namvoyager/simple-user-management
Publish and install initial resources
php artisan user-management:install
Customize and override vendor logic
To customize the logic of the user management feature, you can open the app/Http/Controllers/UserController file.
Here the controller will use UserRepository to handle logic.
namespace App\Http\Controllers; use VoyagerInc\SimpleUserManagement\Contracts\UserRepository; class UserController extends Controller { public function __construct( protected UserRepository $users, ) { } }
To be able to inherit or override VoyagerInc\SimpleUserManagement\Repositories\UserRepository,
you can define a new App\Repositories\UserRepository class and implement
VoyagerInc\SimpleUserManagement\Contracts\UserRepository.
Then go to app\Providers\SimpleUserManagementServiceProvider to declare,
now you can replace the UserRepository class of the vendor.
First, define a new UserRepository in path app\Repositories.
namespace App\Repositories; use VoyagerInc\SimpleUserManagement\Contracts\UserRepository as UserRepositoryContract; class UserRepository implements UserRepositoryContract { // Override all the methods of the interface here. }
Then, go to app\Providers\SimpleUserManagementServiceProvider.php.
use VoyagerInc\SimpleUserManagement\Contracts\UserRepository as UserRepositoryContract; use App\Repositories\UserRepository; public function register() { $this->app->singleton(UserRepositoryContract::class, UserRepository::class); }
Custom view
User management view files are located in the path resources/views/users/.
Corresponding to each screen there will be files: index.blade.php, create.blade.php, show.blade.php, edit.blade.php
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-07