Skip to content

Commit 5054c28

Browse files
committed
Fix Laravel Telescope compatibility, removed dependency on external pivot event package
1 parent 3056852 commit 5054c28

File tree

6 files changed

+28
-49
lines changed

6 files changed

+28
-49
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.21] - 17 May 2019
8+
### Added
9+
- my own implementation of laravel pivot events, based on `fico7489/laravel-pivot`.
10+
11+
### Fixed
12+
- Laravel Telescope compatibility.
13+
14+
### Removed
15+
- dependency on `fico7489/laravel-pivot`.
16+
17+
## [0.4.20] - 17 May 2019
18+
### Added
19+
- caching lazy-loading of belongs-to relationships. Thanks @tmishutin for leading the way forward on this effort! Hopefully this solution will work as a template for lazy-loading other relationship types going forward.
20+
21+
### Fixed
22+
- an issue with prefixing found during testing.
23+
24+
### Removed
25+
- unused code.
26+
27+
## [0.4.19] - 16 May 2019
28+
### Added
29+
- work-around for Laravel Telescope compatibility to README.
30+
731
## [0.4.18] - 14 May 2019
832
### Fixed
933
- polymorphic relationship caching, as well as other queries using `InRaw`.

README.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -48,38 +48,6 @@ composer require genealabs/laravel-model-caching:*
4848
```
4949

5050
## Configuration
51-
### Telescope Compatibility
52-
Due to how a dependent package fires pivot events that are currently
53-
incompatible with Laravel Telescope, you will need to adjust your Model Watcher
54-
in your Telescope configuration, if you use Telescope (if not, you can safely
55-
ignore this section):
56-
57-
```php
58-
use GeneaLabs\LaravelModelCaching\Telescope\ModelWatcher as CustomModelWatcher;
59-
// ...
60-
61-
return [
62-
63-
// ...
64-
65-
'watchers' => [
66-
67-
// ...
68-
69-
CustomModelWatcher::class => [
70-
'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
71-
'events' => ['eloquent.*'],
72-
],
73-
74-
// ...
75-
76-
],
77-
78-
// ...
79-
80-
];
81-
```
82-
8351
### Recommended (Optional) Custom Cache Store
8452
If you would like to use a different cache store than the default one used by
8553
your Laravel application, you may do so by setting the `MODEL_CACHE_STORE`
@@ -113,6 +81,7 @@ abstract class BaseModel
11381
//
11482
}
11583
```
84+
11685
### Multiple Database Connections
11786
__Thanks to @dtvmedia for suggestion this feature. This is actually a more robust
11887
solution than cache-prefixes.__

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"fico7489/laravel-pivot": "*",
12+
"genealabs/laravel-pivot-events": "*",
1313
"illuminate/cache": "5.8.*",
1414
"illuminate/config": "5.8.*",
1515
"illuminate/console": "5.8.*",

src/CachedBelongsToMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace GeneaLabs\LaravelModelCaching;
22

3-
use Fico7489\Laravel\Pivot\Traits\FiresPivotEventsTrait;
3+
use GeneaLabs\LaravelPivotEvents\Traits\FiresPivotEventsTrait;
44
use GeneaLabs\LaravelModelCaching\Traits\Buildable;
55
use GeneaLabs\LaravelModelCaching\Traits\BuilderCaching;
66
use GeneaLabs\LaravelModelCaching\Traits\Caching;

src/Telescope/ModelWatcher.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/Traits/Cachable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace GeneaLabs\LaravelModelCaching\Traits;
22

3-
use Fico7489\Laravel\Pivot\Traits\PivotEventTrait;
3+
use GeneaLabs\LaravelPivotEvents\Traits\PivotEventTrait;
44

55
trait Cachable
66
{

0 commit comments

Comments
 (0)