Closed ahmedash95 closed 8 years ago
when i execute
php artisan langman:trans file.name
If file does not exist it returns
Language file file.php not found, would you like to create it? (yes/no) [no]:
then I type yes and the file gets created with content
<?php
then when I re-execute the command
it asks me for the name key of each language. there is no problem here . but the problem is the new content of the file
<?php return [ 0 => 1, 'name' => 'Name' ]
the reason of the first index 0 with value 1 is getFileContent() Method
return (array) include $filePath;
with empty file the content is '<?php \n' return 0 => 1
so a change to the content of the new file stub should be
file_put_contents($filePath, "<?php\n\nreturn [];");
Oh, nice catch 👍
well done bro (y) @ahmedash95
when i execute
If file does not exist it returns
then I type yes and the file gets created with content
then when I re-execute the command
it asks me for the name key of each language. there is no problem here . but the problem is the new content of the file
the reason of the first index 0 with value 1 is getFileContent() Method
with empty file the content is '<?php \n' return 0 => 1
so a change to the content of the new file stub should be