PHP deprecation fixes, assigning null arguments in methods
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2025-05-22 18:37:04 +10:00
parent 251aefa947
commit b37045acca
11 changed files with 22 additions and 22 deletions

View File

@@ -1,21 +1,21 @@
<?php
/**
* Add a ScopeAuthorised to an Eloquent Model
* This will help limit the scope of accounts that a user can see.
*/
namespace App\Traits;
use Illuminate\Support\Facades\Auth;
use App\Models\User;
/**
* Add a ScopeAuthorised to an Eloquent Model
* This will help limit the scope of accounts that a user can see.
*/
trait ScopeAccountUserAuthorised
{
/**
* Only query records that the user is authorised to see
*/
public function scopeAccountUserAuthorised($query,string $table=NULL,User $uo=NULL)
public function scopeAccountUserAuthorised($query,?string $table=NULL,?User $uo=NULL)
{
if (! $uo)
$uo = Auth::user();