Skip to content

Commit bc3293e

Browse files
committed
Remove unused method
1 parent 60d66cc commit bc3293e

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/CachedModel.php

-18
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@
1111

1212
abstract class CachedModel extends Model
1313
{
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-
3214
public function newEloquentBuilder($query)
3315
{
3416
return new Builder($query);

0 commit comments

Comments
 (0)