Error en Archivo Providers_model.php

40 views
Skip to first unread message

Luis Alberto Bentancur

unread,
May 9, 2024, 8:32:04 AMMay 9
to Easy!Appointments - Support Group
Hola soy de Argentina y comienzo a programar quiero formar un grupo de programación el que quiera que me siga
Como hablo español mi ingles no es bueno les escribo en los dos idiomas

Hello, I'm from Argentina and I'm starting to program. I want to form a programming group whoever wants to follow me.
Since I speak Spanish, my English is not good, I write to you in both languages.

El error que estás viendo se debe al uso incorrecto de la expresión match. En PHP, match es una expresión que se introdujo en la versión 8.0 y se utiliza para realizar comparaciones de coincidencia de patrones. Sin embargo, parece que estás intentando usarlo en una versión anterior de PHP o en un contexto incorrecto.

The error you are seeing is due to incorrect use of the match expression. In PHP, match is an expression that was introduced in version 8.0 and is used to perform pattern matching comparisons. However, it sounds like you're trying to use it in an older version of PHP or in the wrong context.

Este es el código corregido
Asi como esta hay un montón que los iré pasando 

This is the corrected code
Just like this there are a lot that I will pass through



/**
 * Load related resources to a provider.
 *
 * @param array $provider Associative array with the provider data.
 * @param array $resources Resource names to be attached ("services" supported).
 *
 * @throws InvalidArgumentException
 */
public function load(array &$provider, array $resources)
{
    if (empty($provider) || empty($resources))
    {
        return;
    }

    foreach ($resources as $resource)
    {
        switch ($resource)
        {
            case 'services':
                $provider['services'] = $this
                    ->db
                    ->select('services.*')
                    ->from('services')
                    ->join('services_providers', 'services_providers.id_services = services.id', 'inner')
                    ->where('id_users', $provider['id'])
                    ->get()
                    ->result_array();
                break;
            default:
                throw new InvalidArgumentException('The requested provider relation is not supported: ' . $resource);
                break;
        }
    }
}

Alex Tselegidis

unread,
May 13, 2024, 7:02:17 AMMay 13
to Easy!Appointments - Support Group
Hello! 

Thanks for posting this. 

I'm not sure if I understood your message correctly. 

Could you please elaborate? Which error is this about? 


Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!



Pablo Gross

unread,
May 21, 2024, 7:37:40 PMMay 21
to Easy!Appointments - Support Group
No te entiendo , deberías mostrar el código original para ver los cambios realizados!

Alex Tselegidis

unread,
May 27, 2024, 10:58:31 AMMay 27
to Easy!Appointments - Support Group
Hello! 

Thanks for your message. 

For your best support please write your message in English. 
Reply all
Reply to author
Forward
0 new messages