Download the PHP package nobox/lazy-strings-laravel without Composer
On this page you can find all versions of the php package nobox/lazy-strings-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nobox/lazy-strings-laravel
More information about nobox/lazy-strings-laravel
Files in nobox/lazy-strings-laravel
Package lazy-strings-laravel
Short Description Laravel 5 service provider for LazyStrings.
License MIT
Homepage https://github.com/Nobox/lazy-strings-laravel
Informations about the package lazy-strings-laravel
Lazy Strings for Laravel
Laravel 5 service provider for LazyStrings.
Installation
Add Lazy Strings to your composer.json file.
Laravel versions
Here's a rundown on the version(s) of lazy strings that you can use on your current installed laravel version.
| Laravel version | Service Provider version to use |
|---|---|
| 5.0 | 1.0.* |
| 5.1 | 1.1.* |
| 5.2 | 1.2.* |
Register Lazy Strings
Register Lazy Strings service provider in the providers array located in config/app.php
Publish configuration and assets
This package uses some basic configuration and pretty CSS and JS from bootstrap.
Configuration
Configuration is pretty simple, each configuration item is described below. More details on how these work can be found in the Lazy Strings repo here.
-
csv-urlAdd the Google spreadsheet published url. -
target-folderThis folder will be in yourstoragefolder and it just saves a backup of your strings inJSONformat. By default islazy-strings. -
strings-routeThis is the route that will be used to generate the strings. Visithttp://my-app.com/lazy/build-copyand your strings will be updated. By default isbuild-copy. The route will always be under thelazyprefix. -
nestedWhether or not you wish your generated strings array to be nested. sheetsHere you'll specify all the sheets in your Google doc.
How it works
Lazy Strings uses an id => value convention to access the copy, it generates an lazy.php file inside the language locale folder. You can see an example doc here: https://docs.google.com/a/nobox.com/spreadsheets/d/1V_cHt5Fe4x9XwVepvlXB39sqKXD3xs_QbM-NppkrE4A/edit#gid=0.
| id | value |
|---|---|
| foo | Hello! |
| lazy | LazyStrings |
| laravel | PHP Framework |
In this doc you can access the first row in your view like this:
Or in your controller like this:
Generate your strings
Each time you need to generate your strings just visit the specified strings-route in your configuration. The route will always be under the lazy prefix. For example: http://my-app.com/lazy/build-copy
You can also use the included artisan command php artisan lazy:deploy. It will do exactly the same. This is perfect when you're deploying your application with Forge or Envoyer.
License
MIT
All versions of lazy-strings-laravel with dependencies
nobox/lazy-strings Version ^5.0
illuminate/support Version 5.2.*
illuminate/console Version 5.2.*
illuminate/filesystem Version 5.2.*