Skip to content

Commit 94bd271

Browse files
Handle cache in FindBook
1 parent 0c68670 commit 94bd271

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Api/FindBook.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55
use Code16\LaravelTiteliveClient\Api\Clients\BookDirectoryClient;
66

7-
class FindBook
7+
class FindBook extends CacheableAction
88
{
9+
protected string $gencod;
10+
911
public function find(string $gencod)
12+
{
13+
$this->gencod = $gencod;
14+
15+
return $this->executeCacheable();
16+
}
17+
18+
protected function execute()
1019
{
1120
return app(BookDirectoryClient::class)
12-
->setParam(BookDirectoryClient::GENCOD, $gencod)
21+
->setParam(BookDirectoryClient::GENCOD, $this->gencod)
1322
->doFind();
1423
}
1524
}

0 commit comments

Comments
 (0)