Esempio n. 1
0
    /**
     * ajax get link download.
     * @param $gameId
     * @return Response
     */
    public function downloadLink($gameId)
    {
        //return json to ajax.
        $link = session()->get($gameId . '_download');
        if (!$link) {
            $game = Game::find($gameId);
            $crawler = new MainCrawler();
            $link = $crawler->download($game);
            session()->put($gameId . '_download', $link);
        }

        return response()->json(['link' =>  $link]);
    }
Esempio n. 2
0
    /**
     *
     */
    public function import()
    {
        $crawler = new MainCrawler();
        $crawler->import(5000);

    }