Skip to content

Commit daa4fa9

Browse files
authored
fix(view-composer): strip "composers" from views()
Since namespace was changed from `App\Composers` to `App\View\Composers`, Composer::views() - the method for automatically associating composers with view files - also needs to strip off the new namespace to accurately associate with views.
1 parent 8155b35 commit daa4fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Acorn/View/Composer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static function views()
4040
return static::$views;
4141
}
4242

43-
$view = array_slice(explode('\\', static::class), 2);
43+
$view = array_slice(explode('\\', static::class), 3);
4444
$view = array_map([Str::class, 'snake'], $view, array_fill(0, count($view), '-'));
4545
return implode('/', $view);
4646
}

0 commit comments

Comments
 (0)