get("https://mihaaru.com/rss")["channel"]["item"]) ->filter(function ($item, $key) { return Str::of($item["link"])->contains(['news']); }); $articlesitems = []; //Looping through the articles and scraping and while scraping it creates a new instance of the scraper. foreach ($articles as $article) { $link = $article['link']; $date = $article['pubDate']; $articlesitems[] = (new MihaaruScraper)->extract($link, $date); } return $articlesitems; } }