We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60d66cc commit bc3293eCopy full SHA for bc3293e
src/CachedModel.php
@@ -11,24 +11,6 @@
11
12
abstract class CachedModel extends Model
13
{
14
- protected function getRelationshipFromMethod($method)
15
- {
16
- $relation = $this->$method();
17
-
18
- if (! $relation instanceof Relation) {
19
- throw new LogicException(get_class($this).'::'.$method.' must return a relationship instance.');
20
- }
21
22
- $results = $this->cache([$method])
23
- ->rememberForever(str_slug(get_called_class()) . "-{$method}", function () use ($relation) {
24
- return $relation->getResults();
25
- });
26
27
- return tap($results, function ($results) use ($method) {
28
- $this->setRelation($method, $results);
29
30
31
32
public function newEloquentBuilder($query)
33
34
return new Builder($query);
0 commit comments