mpaleo/view-tags is a Laravel package for simple way to tag your laravel views.
It currently has 4 GitHub stars and 352 downloads on Packagist (latest version v1.0.0).
Install it with composer require mpaleo/view-tags.
Discover more Laravel packages by mpaleo
or browse all Laravel packages to compare alternatives.
Last updated
Add the package to your composer.json
...
"mpaleo/view-tags": "~1.0",
...
Update
composer update
Add the service provider to the providers array in {laravel-root}\config\app.php
...
ViewTags\ViewTagsServiceProvider::class,
...
Add the alias in {laravel-root}\config\app.php
...
'ViewTags' => ViewTags\ViewTags::class,
...
ViewTags::tag('viewOne', 'someTag');
ViewTags::tag('viewTwo', 'someTag');
ViewTags::tag('viewThree', ['someTag', 'anotherTag']);
ViewTags::taggedWith('someTag');
/* Output:
* array(3) {
* [0] => "viewOne"
* [1] => "viewTwo"
* [2] => "viewThree"
* }
*/
ViewTags::taggedWith('anotherTag');
/* Output:
* array(1) {
* [0] => "viewThree"
* }
*/
The view tags package is licensed under the MIT license