File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1+ language : php
2+
3+ php :
4+ - 7.0
5+ - 7.1
6+
7+ env :
8+ matrix :
9+ - COMPOSER_FLAGS="--prefer-lowest"
10+ - COMPOSER_FLAGS=""
11+
12+ before_install :
13+ - sudo apt-get update
14+ - travis_retry composer self-update
15+
16+ install :
17+ - travis_retry composer update --prefer-dist --prefer-stable $COMPOSER_FLAGS
18+
19+ script :
20+ - ./vendor/bin/phpunit
Original file line number Diff line number Diff line change 11# Cache models by tagging
22
3+ [ ![ Latest Version] ( https://img.shields.io/github/release/anorgan/laravel-cache.svg?style=flat-square )] ( https://github.com/anorgan/laravel-cache/releases )
4+ [ ![ Quality Score] ( https://img.shields.io/scrutinizer/g/anorgan/laravel-cache.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/anorgan/laravel-cache/?branch=master )
5+ [ ![ Build Status] ( https://img.shields.io/travis/anorgan/laravel-cache.svg?style=flat-square )] ( https://travis-ci.org/anorgan/laravel-cache )
6+ [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square )] ( https://raw.githubusercontent.com/anorgan/laravel-cache/master/LICENSE )
7+
38This package aims to help with caching of models by tagging them and invalidating caches on model change.
49
510## Installation
@@ -59,4 +64,4 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
5964
6065## License
6166
62- The MIT License (MIT). Please see [ License File] ( LICENSE ) for more information.
67+ The MIT License (MIT). Please see [ License File] ( LICENSE ) for more information.
Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ private function getTagsFromCollection(Collection $collection)
4545 */
4646 private function getTags (Model $ model )
4747 {
48- $ tags [] = $ this ->createTag ($ model );
48+ $ tags = [
49+ $ this ->createTag ($ model ),
50+ ];
4951
5052 foreach ($ model ->getRelations () as $ relation ) {
5153 if ($ relation instanceof Collection) {
You can’t perform that action at this time.
0 commit comments