This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* Generate RainLab translation index | |
* @see https://github.com/rainlab/translate-plugin#indexed-attributes | |
* | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use RainLab\Location\Models\Country; | |
Route::get('generate-country-translations', function () { | |
$countries = Country::all(); | |
$countries->each(function (Country $country) { | |
$response = file_get_contents("https://restcountries.com/v2/alpha/{$country->code}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Your\Plugin; | |
use Event; | |
use System\Classes\PluginBase; | |
class Plugin extends PluginBase | |
{ | |
// [...] | |
/** |
OlderNewer