Skip to content

Commit

Permalink
Merge pull request #11 from andrewdwallo/dev
Browse files Browse the repository at this point in the history
Removed unused dependencies
  • Loading branch information
andrewdwallo authored Nov 4, 2022
2 parents f2a3936 + 3b807d8 commit 44d76ef
Show file tree
Hide file tree
Showing 11 changed files with 640 additions and 1,842 deletions.
8 changes: 2 additions & 6 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Models\Company;
use App\Models\Department;
use App\Models\Employee;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable implements HasMedia
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable, InteractsWithMedia, HasRoles;
use HasApiTokens, HasFactory, Notifiable, HasRoles;

/**
* The attributes that are mass assignable.
Expand Down
12 changes: 6 additions & 6 deletions app/Policies/RolePolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function deleteAny(User $user)
*/
public function forceDelete(User $user, Role $role)
{
return $user->can('force_delete_role');
return $user->can('{{ ForceDelete }}');
}

/**
Expand All @@ -99,7 +99,7 @@ public function forceDelete(User $user, Role $role)
*/
public function forceDeleteAny(User $user)
{
return $user->can('force_delete_any_role');
return $user->can('{{ ForceDeleteAny }}');
}

/**
Expand All @@ -111,7 +111,7 @@ public function forceDeleteAny(User $user)
*/
public function restore(User $user, Role $role)
{
return $user->can('restore_role');
return $user->can('{{ Restore }}');
}

/**
Expand All @@ -122,7 +122,7 @@ public function restore(User $user, Role $role)
*/
public function restoreAny(User $user)
{
return $user->can('restore_any_role');
return $user->can('{{ RestoreAny }}');
}

/**
Expand All @@ -134,7 +134,7 @@ public function restoreAny(User $user)
*/
public function replicate(User $user, Role $role)
{
return $user->can('replicate_role');
return $user->can('{{ Replicate }}');
}

/**
Expand All @@ -145,7 +145,7 @@ public function replicate(User $user, Role $role)
*/
public function reorder(User $user)
{
return $user->can('reorder_role');
return $user->can('{{ Reorder }}');
}

}
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"bezhansalleh/filament-shield": "^2.2.7",
"doctrine/dbal": "^3.5",
"filament/filament": "^2.16.36",
"filament/spatie-laravel-media-library-plugin": "^2.16",
"filament/spatie-laravel-settings-plugin": "^2.16",
"filament/spatie-laravel-tags-plugin": "^2.16",
"filament/spatie-laravel-translatable-plugin": "^2.16",
"flowframe/laravel-trend": "^0.1.1",
"guzzlehttp/guzzle": "^7.5",
"jeffgreco13/filament-breezy": "^1.4.7",
Expand Down
Loading

0 comments on commit 44d76ef

Please sign in to comment.