REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.36 KB
Close
/home/byroehnu/easetack.com/app/Http/Controllers/UpdateController.php
Text
Base64
<?php namespace App\Http\Controllers; use App\Models\Setting; use Illuminate\Http\Request; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\File; class UpdateController extends Controller { public function update() { $sql_path = base_path('update.sql'); if (file_exists($sql_path)){ DB::unprepared(file_get_contents($sql_path)); // copy language file $language = json_decode(Setting::pull('languages'), true); $directory = base_path('lang/'); $newData = base_path('lang.json'); $newLangData = json_decode(File::get($newData), true); foreach ($language as $key => $lang){ $path = $directory.$key.'.json'; $existingData = []; if (File::exists($path)) { $existingData = json_decode(File::get($path), true); } $mergedData = array_merge($existingData, $newLangData); File::put($path, json_encode($mergedData, JSON_PRETTY_PRINT)); } // Delete the update.sql file unlink($sql_path); unlink($newData); // create symlink Artisan::call('storage:link'); Artisan::call('optimize:clear'); return redirect('/'); } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 4 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Admin
DIR
-
drwxrwxrwx
2025-05-16 16:14:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Auth
DIR
-
drwxrwxrwx
2025-05-16 16:14:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Debug
DIR
-
drwxrwxrwx
2025-05-16 16:14:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Frontend
DIR
-
drwxrwxrwx
2025-05-16 16:14:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Controller.php
336 B
lrw-rw-rw-
2025-04-19 04:22:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DebugController.php
192 B
lrw-rw-rw-
2025-04-08 09:46:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InstallController.php
4.00 KB
lrw-rw-rw-
2025-05-04 09:44:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LoginLinkController.php
3.66 KB
lrw-rw-rw-
2025-05-04 10:26:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProfileController.php
1.48 KB
lrw-rw-rw-
2025-04-08 04:12:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
UpdateController.php
1.36 KB
lrw-rw-rw-
2025-05-08 12:55:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).