mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix: lazy load catalog
This commit is contained in:
parent
87a73046c5
commit
b4d817bc84
3 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ new class extends Component {
|
|||
|
||||
$this->catalogPlugins = Cache::remember('catalog_plugins', 43200, function () use ($catalogUrl) {
|
||||
try {
|
||||
$response = Http::get($catalogUrl);
|
||||
$response = Http::timeout(10)->get($catalogUrl);
|
||||
$catalogContent = $response->body();
|
||||
$catalog = Yaml::parse($catalogContent);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ new class extends Component {
|
|||
{
|
||||
try {
|
||||
$this->recipes = Cache::remember('trmnl_recipes_newest', 43200, function () {
|
||||
$response = Http::get('https://usetrmnl.com/recipes.json', [
|
||||
$response = Http::timeout(10)->get('https://usetrmnl.com/recipes.json', [
|
||||
'sort-by' => 'newest',
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue