Skip to content

Commit

Permalink
Merge branch 'master' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
santigarcor committed Jan 16, 2025
2 parents 9c87ac0 + a35abe7 commit 1c1b404
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
include:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/8.x/the-basics/models/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

```php
<?php

use Illuminate\Foundation\Auth\User as Authenticatable;
use Laratrust\Contracts\LaratrustUser;
use Laratrust\Traits\HasRolesAndPermissions;

class User extends Model implements LaratrustUser
class User extends Authenticatable implements LaratrustUser
{
use HasRolesAndPermissions; // add this trait to your user model

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/8.x/usage/querying-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ To retrive all the users that don't have any roles or permissions you can use:
```php
User::whereDoesntHaveRoles()->get();

User::whereDoesntHavePermission()->get();
User::whereDoesntHavePermissions()->get();
```
1 change: 1 addition & 0 deletions resources/views/setup-teams.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class LaratrustSetupTeams extends Migration
{
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/LaratrustUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ public function syncPermissions(
*
* @return Collection<\Laratrust\Contracts\Permission>
*/
public function allPermissions(array $columns = null, $team = false): Collection;
public function allPermissions(?array $columns = null, mixed $team = false): Collection;
}
2 changes: 1 addition & 1 deletion src/Http/Controllers/PermissionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function create()
public function store(Request $request)
{
$data = $request->validate([
'name' => 'required|string|unique:'.config('laratrust.tables.roles', 'roles').',name',
'name' => 'required|string|unique:'.config('laratrust.tables.permissions', 'permissions').',name',
'display_name' => 'nullable|string',
'description' => 'nullable|string',
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasRolesAndPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public function syncPermissionsWithoutDetaching(
*
* @return Collection<\Laratrust\Contracts\Permission>
*/
public function allPermissions(array $columns = null, $team = false): Collection
public function allPermissions(?array $columns = null, mixed $team = false): Collection
{
$columns = is_array($columns) ? $columns : null;
if ($columns) {
Expand Down

0 comments on commit 1c1b404

Please sign in to comment.