From 07ee3e820b34df5e422fb868886fd190880dfc7f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 26 Jun 2020 16:56:25 -0500 Subject: [PATCH] add alias --- src/Illuminate/View/ComponentAttributeBag.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Illuminate/View/ComponentAttributeBag.php b/src/Illuminate/View/ComponentAttributeBag.php index d4986bd6037..ecdca585d00 100644 --- a/src/Illuminate/View/ComponentAttributeBag.php +++ b/src/Illuminate/View/ComponentAttributeBag.php @@ -107,6 +107,17 @@ public function whereStartsWith($string) }); } + /** + * Return a bag of attributes that have keys starting with the given value / pattern. + * + * @param string $string + * @return static + */ + public function thatStartWith($string) + { + return $this->whereStartsWith($string); + } + /** * Exclude the given attribute from the attribute array. *