protected function prepareRequestAttributes(array $attributes): array
    {
        $preparedAttributes = [];

        foreach ($attributes as $key => $value) {
            if ($key === '_route') {
                if (\is_object($value) && $value instanceof RouteContract) {
                    /** @var RouteContract $route */
                    $route = $value;
                    $value = [
                        'Uri'        => $route->getUri(),
                        'Parameters' => $route->getParameters(),
                    ];
                }

                $preparedAttributes[$key] = $value;
            } elseif ($value instanceof StoreContract) {
                $preparedAttributes[$key] = $value->getId();
            } else {
                $preparedAttributes[$key] = $value;
            }
        }

        return $preparedAttributes;
    }
protected function prepareRequestAttributes(array $attributes): array
    {
        $preparedAttributes = [];

        foreach ($attributes as $key => $value) {
            if ($key === '_route') {
                if (\is_object($value) && $value instanceof RouteContract) {
                    /** @var RouteContract $route */
                    $route = $value;
                    $value = [
                        'Uri'        => $route->getUri(),
                        'Parameters' => $route->getParameters(),
                    ];
                }

                $preparedAttributes[$key] = $value;
            } elseif ($value instanceof StoreContract) {
                $preparedAttributes[$key] = $value->getId();
            } else {
                $preparedAttributes[$key] = $value;
            }
        }

        return $preparedAttributes;
    }
protected function prepareRequestAttributes ( array $ attributes ) : array { $ preparedAttributes = [ ] ; foreach ( $ attributes as $ key => $ value ) { if ( $ key === '_route' ) { if ( \ is_object ( $ value ) && $ value instanceof RouteContract ) { /** @var RouteContract $route */ $ route = $ value ; $ value = [ 'Uri' => $ route -> getUri ( ) , 'Parameters' => $ route -> getParameters ( ) , ] ; } $ preparedAttributes [ $ key ] = $ value ; } elseif ( $ value instanceof StoreContract ) { $ preparedAttributes [ $ key ] = $ value -> getId ( ) ; } else { $ preparedAttributes [ $ key ] = $ value ; } } return $ preparedAttributes ; }
Prepare request attributes, check of route object.

@param array $attributes

@return array
Prepare request attributes check of route object .