i´m trying solve this problem in laravel with larastan
Access to an undefined property
IlluminateDatabaseEloquentModel::$bloqueante
I´m doing in my class:
/**
* @property int $id
* @property bool $bloqueante
* @property string $mensajeError
* IlluminateSupportCollection<Validacion> $validacion
*/
This properties it´s my errors. The code that return this message it´s, for example:
$this->validacion = Validacion::where('tipoFicheroControl_id' .....)->first()
.................
$mensaje = json_encode([
"tipo" => ($this->validacion->bloqueante == 1) ? 'Error' : 'Warning',
I changed my logic in variable $this->validacion. Before this variable it´s defined in locally. Now it´s defined in class with protected.
other similar error, i can solve using: * IlluminateSupportCollection<Validacion> $validacion
In my model i have defined:
/**
* AppModelsValidacion
*
* @property string $clasePHP
* @property string $mensajeError
* @property bool $bloqueante
* @property string $parametrosClase
* @property bool $habilitada
* @property EstructuraFichero $columna
*/
and i have fillable array. But in this class always return this message.
Sorry for my bad english, and i hope that anybody can help me.