From 47f0fbccea370a9a3a351f0c31681a90ba716d83 Mon Sep 17 00:00:00 2001 From: Theraloss Date: Fri, 26 Feb 2021 15:08:27 +0100 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78e3839..aa2737a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ $post = [ dump($tags); // ['foo', 'bar'] dump($gallery); // [['image' => 'image.jpg'], ['image' => 'image2.jpg']] -dump($article) // ['title' => 'Article 1', 'slug' => 'article-1', ...] without tags and gallery +dump($article) // ['title' => 'Article 1', 'slug' => 'article-1', 'description' => 'Lorem ipsum'] ``` Destructuring with multiple grouped keys @@ -107,7 +107,7 @@ $post = [ dump($slug); // article-1 dump($meta); // ['tags' => ['foo', 'bar'], 'gallery' => ['image' => 'image.jpg'], ['image' => 'image2.jpg']] -dump($article) // ['title' => 'Article 1', 'slug' => 'article-1', ...] without slug, tags and gallery +dump($article) // ['title' => 'Article 1', 'description' => 'Lorem ipsum'] [$notFoundGroup, $article] = Arr::destructure($post, [['notFound1', 'notFound2']]);