ViewFileHelper
class ViewFileHelper
Traits
Properties
| protected Container|null | $container | from HasContainer |
Methods
Create a new view file helper instance.
Track the root view directories.
Track every view directory.
Get the view files in the root view directories.
Get the view files in every view directory.
Get the names of the views that can be reported as unused.
Get the Blade view files beneath the given directory.
Get the booted application's view finder.
Details
in
HasContainer at line 19
void
setContainer(Container $container)
Set the container used for resolution.
in
HasContainer at line 27
Container
getContainer()
Return the current container.
in
HasContainer at line 35
mixed
resolve(string $abstract)
Resolve the given type from the container.
at line 65
__construct(array $viewDirectories, FileHelper $fileHelper, RuntimeInputs $runtimeInputs)
Create a new view file helper instance.
Configured directories replace the booted finder's paths and namespace hints for the unused-view rule; the missing-translation rule always scans the finder's paths, as upstream does. Upstream also names the views in namespace hint directories as though they were root views. Those views are only scanned for usages here: framework and package views, such as pagination::tailwind, are rendered by names that no literal call shows.
at line 99
void
trackRootViewDirectories(Scope $scope)
Track the root view directories.
The result cache runs the rule again when a view file in the root view directories changes.
at line 112
void
trackAllViewDirectories(Scope $scope)
Track every view directory.
The result cache runs the rule again when a view file in any of the view directories changes.
at line 123
Generator
getRootViewFilePaths()
Get the view files in the root view directories.
at line 137
Generator
getAllViewFilePaths()
Get the view files in every view directory.
at line 151
Generator
getAllViewNames()
Get the names of the views that can be reported as unused.
at line 175
protected array
getViews(string $path)
Get the Blade view files beneath the given directory.
at line 195
protected ViewFinderInterface
finder()
Get the booted application's view finder.