This repository was archived by the owner on Jul 16, 2020. It is now read-only.
This repository was archived by the owner on Jul 16, 2020. It is now read-only.
Unexpected data while processing vue-i18n:generate #97
Open
Description
I have a Laravel 6 Porject with very easy Models. But the generation stops because of a model with:
Exception : Unexpected data while processing /home/vagrant/code/lukaeu-elearning/app/Question.php
at /home/vagrant/code/lukaeu-elearning/vendor/martinlindhe/laravel-vue-i18n-generator/src/Generator.php:212
208|
209| $tmp = include($fileName);
210|
211| if (gettype($tmp) !== "array") {
> 212| throw new Exception('Unexpected data while processing ' . $fileName);
213| continue;
214| }
215| if ($lastLocale !== false) {
216| $root = realpath(base_path() . $this->config['langPath'] . DIRECTORY_SEPARATOR . $lastLocale);
Exception trace:
1 MartinLindhe\VueInternationalizationGenerator\Generator::allocateLocaleArray("/home/vagrant/code/lukaeu-elearning/app")
/home/vagrant/code/lukaeu-elearning/vendor/martinlindhe/laravel-vue-i18n-generator/src/Generator.php:80
2 MartinLindhe\VueInternationalizationGenerator\Generator::generateFromPath("/home/vagrant/code/lukaeu-elearning", "es6")
/home/vagrant/code/lukaeu-elearning/vendor/martinlindhe/laravel-vue-i18n-generator/src/Commands/GenerateInclude.php:67
Please use the argument -v to see more details.```
Here is the model:
```<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Question extends Model
{
public function answers()
{
return $this->hasMany(Answer::class, 'question_id', 'id');
}
public function video()
{
return $this->belongsTo(Video::class, 'video_id', 'id');
}
}
Why is stoping at a model when it points to 'resources/lang' folder?