mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
controller refactoring part 12
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user