Files
core/app/Console/Commands/TranslateAll.php
T

43 lines
958 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
class TranslateAll extends Command
{
/**
* The name and signature of the console command.
* @var string
*/
protected $signature = 'translate:all';
/**
* The console command description.
* @var string
*/
protected $description = 'Checks for missing translations in all modules.';
/**
* Create a new command instance.
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
* @return mixed
*/
public function handle()
{
$this->call('translate:dir', ['dir' => 'resources/lang']);
$modules = File::directories('modules');
foreach ($modules as $module) {
$this->call('translate:dir', ['dir' => $module.'/Resources/lang']);
}
}
}