Adldap\Laravel\Traits\ImportsUsers::handleAttributeCallback PHP Method

handleAttributeCallback() protected method

Handles retrieving the value from an attribute callback.
protected handleAttributeCallback ( User $user, string $callback ) : mixed
$user Adldap\Models\User
$callback string
return mixed
    protected function handleAttributeCallback(User $user, $callback)
    {
        // Explode the callback into its class and method.
        list($class, $method) = explode('@', $callback);
        // Create the handler.
        $handler = app($class);
        // Call the attribute handler method and return the result.
        return call_user_func_array([$handler, $method], [$user]);
    }