我正在尝试使用 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 = [ 'PI', 'BusinessName' ]; 我不知道这是否可以帮助你,但我正在使用 Laravel 作为框架。任何人都可以帮助我,好吗?