Created
July 2, 2021 20:45
-
-
Save AhmedHelalAhmed/9a4a4a97277ec2caf630735d0bcfe6a2 to your computer and use it in GitHub Desktop.
ar to en laravel resource
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 Illuminate\Support\Facades\File; | |
Route::get('/fix-local', function () { | |
$file=collect(json_decode(File::get('/var/www/html/invoice-app/resources/lang/ar.json'),true)); | |
$file=$file->map(function($item,$key){ | |
return $key; | |
}); | |
File::put('/var/www/html/invoice-app/resources/lang/en.json',json_encode($file)); | |
dd('Done'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment