willvrd/vuser-module

Vuser Module - VGreen Application

Maintainers

Details

github.com/willvrd/Vuser

Source

Issues

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:vgreen-module

dev-master 2020-09-06 01:28 UTC

This package is auto-updated.

Last update: 2022-09-06 06:17:48 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/

  • User

  • Auth

  • Role

  • Permission

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