Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 3 roles and permissions #4

Merged
merged 2 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
FAKER_LOCALE=en_GB

LOG_CHANNEL=stack
LOG_LEVEL=debug
Expand Down
10 changes: 10 additions & 0 deletions app/Models/Permission.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Models;

use Laratrust\Models\LaratrustPermission;

class Permission extends LaratrustPermission
{
public $guarded = [];
}
10 changes: 10 additions & 0 deletions app/Models/Role.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Models;

use Laratrust\Models\LaratrustRole;

class Role extends LaratrustRole
{
public $guarded = [];
}
2 changes: 2 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
use Laravel\Fortify\TwoFactorAuthenticatable;
use Laravel\Jetstream\HasProfilePhoto;
use Laravel\Sanctum\HasApiTokens;
use Laratrust\Traits\LaratrustUserTrait;

class User extends Authenticatable
{
use LaratrustUserTrait;
use HasApiTokens;
use HasFactory;
use HasProfilePhoto;
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"laravel/jetstream": "^1.6",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.5",
"livewire/livewire": "^2.0"
"livewire/livewire": "^2.0",
"santigarcor/laratrust": "^6.3"
},
"require-dev": {
"facade/ignition": "^2.5",
Expand Down
127 changes: 126 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
|
*/

'faker_locale' => 'en_US',
'faker_locale' => env('FAKER_LOCALE', 'en_US'),

/*
|--------------------------------------------------------------------------
Expand Down
Loading