SmarterVision / laravel-generator

MIT License
4 stars 39 forks source link

Undefined GeneratorField: :$isOrderable #2

Open ebrahim5200 opened 4 years ago

ebrahim5200 commented 4 years ago

ErrorException : Undefined property: InfyOm\Generator\Common\GeneratorField: :$isOrderable

smartervisi on\laravel-generator\src\Common\GeneratorField.php:151 147| if ($key == 'fieldTitle') { 148| return Str::title(strreplace('', ' ', $this->name)); 149| } 150|

151| return $this->$key; 152| } 153| } 154|

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined p roperty: InfyOm\Generator\Common\GeneratorField::$isOrderable"

diego-lipinski-de-castro commented 4 years ago

found a solution?

ivannau commented 4 years ago

Found same issue today, It was okay to generate a controller then, but today I found same error here. What happen?

ivannau commented 4 years ago

I found out that _get($key) method in GeneratorField.php throw error because it didn't set anything. $key variables is isOrderable but $this itself didn't contain isOrderable key. I just set return $this->$key to $this, and it works.