In Laravel I can return data from Google analytics to get most visited page with this command:
$FilterData =$this->parseResults($data)->pluck('url');
It will be return this URLs:
[
"/products/r4-04",
"/products/r6-01",
"/products/cu3-20",
"/products/r4-51",
"/products/zp-1",
"/products/r5-31",
"/products/cu3-64",
"/products/cu6-01-1",
"/products/cu6-01-2",
"/products/r4-14",
"/products/t4-74",
"/products/cu-001",
"/products/cu5-18",
"/products/zp-8",
"/products/td6-01",
"/products/t4-14",
"/products/c6-01"
]
Now I want to remove all /products/
word from this and find the products by slug.