public function formExtendQuery($query)
    {
        if (!$this->user->isSuperUser()) {
            $query->where('is_superuser', false);
        }

        // Ensure soft-deleted records can still be managed
        $query->withTrashed();
    }
public function formExtendQuery($query)
    {
        if (!$this->user->isSuperUser()) {
            $query->where('is_superuser', false);
        }

        // Ensure soft-deleted records can still be managed
        $query->withTrashed();
    }
public function formExtendQuery ( $ query ) { if ( ! $ this -> user -> isSuperUser ( ) ) { $ query -> where ( 'is_superuser' , false ) ; } // Ensure soft-deleted records can still be managed $ query -> withTrashed ( ) ; }
Extends the form query to prevent non-superusers from accessing superusers at all
Extends the form query to prevent non - superusers from accessing superusers at all