willvrd / vuser-module
Vuser Module - VGreen Application
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:vgreen-module
Requires
- php: >=7.0.0
- composer/installers: ~1.0
- laravel/passport: ~9.1
- laravel/ui: ~2.0
- spatie/laravel-permission: ~3.13
- willvrd/vcore-module: dev-master
- willvrd/vgreen-installer: *
This package is auto-updated.
Last update: 2024-04-06 09:30:36 UTC
README
Installation
composer require willvrd/vuser-module
Steps
1. Run authentication:
php artisan ui vue --auth
2. Run Migrations
php artisan migrate
3. Install Laravel Passport
php artisan passport:install
4. Go to config/auth.php
- Set the driver option of the api authentication guard to passport
- Change the model from provider to: Modules\Vuser\Entities\User::class,
5. Add the service provider in your config/app.php file:
'providers' => [ // ... Spatie\Permission\PermissionServiceProvider::class, ];
6. Publish the migration and the config/permission.php config file
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
7. Go to config/permission.php
- Change 'model_has_permissions' => 'user_has_permissions',
- Change 'model_has_roles' => 'user_has_roles',
- Change 'model_morph_key' => 'user_id',
8. Run Migrations
php artisan migrate
9. Run this command:
php artisan user:role-permission:init
Assets Module
1. cd Modules/Vuser
2. npm install
3. npm run dev
4. In your view add:
@section('scripts-modules') <script src="{{ mix('js/vuser.js') }}"></script> @stop
End Points
Route Base: https://yourhost.com/api/user/v1/
Backend
### Pages
Index: http://mysite/en/backend/user/users
name: locale.admin.user.users.index
Index: http://mysite/en/backend/user/roles
name: locale.admin.user.roles.index