From c3d809c7d2683b0984dd0e8bd6d7b7b71af1d49f Mon Sep 17 00:00:00 2001 From: David Llop Date: Fri, 1 Feb 2019 23:04:17 +0100 Subject: [PATCH] Change array_first for Arr::first since it will be deprecated in Laravel 5.8 --- src/Component.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Component.php b/src/Component.php index a568b3d..3dbac4c 100644 --- a/src/Component.php +++ b/src/Component.php @@ -2,6 +2,7 @@ namespace Spatie\BladeX; +use Illuminate\Support\Arr; use Illuminate\Contracts\Support\Arrayable; use Spatie\BladeX\Exceptions\CouldNotRegisterComponent; @@ -61,7 +62,7 @@ protected function determineDefaultTag(string $view): string $tag = kebab_case(end($baseComponentName)); if (str_contains($view, '::') && ! str_contains($tag, '::')) { - $namespace = array_first(explode('::', $view)); + $namespace = Arr::first(explode('::', $view)); $tag = "{$namespace}::{$tag}"; }