我尝试使用Enterprise Architect工具通过逆向工程在PHP中创建组件图。但是当我尝试执行它时会出现错误。这些是错误日志:
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Client.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Sensor.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Site.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\User.php on line 17. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Client.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Sensor.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Site.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\User.php on line 17. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Client.php on line 10. Unexpected symbol: ,
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Sensor.php on line 10. Unexpected symbol: ,
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Site.php on line 10. Unexpected symbol: ,
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\User.php on line 18. Unexpected symbol: ,
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Client.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Sensor.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\Site.php on line 9. Unexpected symbol: [
There was an error parsing C:\Users\Utente\Dropbox\FourBit\Ingegneria\PROGETTO\Componenti Progetto\Class\User.php on line 17. Unexpected symbol: [
例如,以下是 Client.php :
的代码<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Client extends Model
{
protected $fillable = [
'PI', 'BusinessName'
];
public function address()
{
return $this->belongsTo(Address::class);
}
public function users()
{
return $this->hasMany(User::class);
}
错误解析在 protected $ fillable = [ &#39; PI&#39;,&#39; BusinessName&#39; ]; 我不知道这是否可以帮助你,但我使用的是Laravel框架。 有人可以帮帮我吗?