PHP code example of tsekka / data-loader
1. Go to this page and download the library: Download tsekka/data-loader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tsekka / data-loader example snippets
php
// your-app-root-directory/data/packages.php
return [
'base' => [
'title' => __('Base Package'),
'price' => 25
], // ...
];
php
// DemoController.php
App::setLocale('es');
return data('packages.base.title');
// returns 'Paquete base' (if there is a translation for Base Package)