/** * Deploy LazyStrings. * * @return Illuminate\Http\Response */ public function deploy() { $this->lazyStrings->generate(); $metadata = $this->lazyStrings->getMetadata(); $this->data['lazyVersion'] = LazyStrings::VERSION; $this->data['refreshedBy'] = $metadata['refreshedBy']; $this->data['refreshedOn'] = $metadata['refreshedOn']; return view('lazy-strings::lazy', $this->data); }
/** * @test */ public function it_stores_strings_in_json_format() { $lazyStrings = new LazyStrings(['url' => $this->url, 'sheets' => ['en' => 0, 'es' => 1329731586, 'pt' => 1443604037], 'target' => __DIR__, 'backup' => __DIR__, 'nested' => true]); $strings = $lazyStrings->generate(); $this->assertTrue(file_exists(__DIR__ . '/es.json')); $this->assertTrue(file_exists(__DIR__ . '/en.json')); $this->assertTrue(file_exists(__DIR__ . '/pt.json')); }