controller refactoring part 12

This commit is contained in:
Peter Papp
2021-07-20 17:27:18 +02:00
parent b0859f71cd
commit 2333b52d68
10 changed files with 123 additions and 105 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace Domain\Maintenance\Controllers;
use Gate;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Domain\Localization\Services\LanguageService;
class UpgradeTranslationsController extends Controller
{
/**
* Get new language translations from default translations
* and insert it into database
*/
public function __invoke(): Response
{
// Check admin permission
Gate::authorize('maintenance');
resolve(LanguageService::class)
->upgrade_language_translations();
return response('Done.', 201);
}
}