ReadOnlyTraitLaravel icon indicating copy to clipboard operation
ReadOnlyTraitLaravel copied to clipboard

Laravel 9 compatibility issue

Open CyberLPKF opened this issue 1 year ago • 0 comments

When a recently upgrade my system that uses ReadOnlyTrait, the following error is showed:

Declaration of MichaelAChrisco\ReadOnly\ReadOnlyTrait::touch() must be compatible with Illuminate\Database\Eloquent\Model::touch($attribute = null)

To correct this error, I just change line 163 in ReadOnlyTrait:

public function touch()

to

public function touch($attribute = null)

And now it's working well.

Thanks.

BTW: Before I open this issue, I had try open a PR, but github doesn't allow me.

CyberLPKF avatar Aug 01 '22 12:08 CyberLPKF