FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

How to show data in other Laravel view #385

Closed mehdielaissi closed 5 years ago

mehdielaissi commented 5 years ago

I have created a form where the user can chose a website and tag and I want to show the data using @laravel I tryed this but it's not working any help please?

public function search(Request $request) {

        $client = new Client();

        $website = $request->input('website');
        $tag = $request->input('tag');

        $crawler = $client->request('GET', $website);

        $data = $crawler->filter($tag);
        dd($data);

    }