Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Created July 2, 2021 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AhmedHelalAhmed/9a4a4a97277ec2caf630735d0bcfe6a2 to your computer and use it in GitHub Desktop.
Save AhmedHelalAhmed/9a4a4a97277ec2caf630735d0bcfe6a2 to your computer and use it in GitHub Desktop.
ar to en laravel resource
<?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