From 05959ff916fee890774d747bd7e3d89050e31aef Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Wed, 3 Jul 2024 13:07:15 -0400 Subject: [PATCH] Fix missing model attribute errors in Laravel versions with strict mode enabled --- CHANGELOG.md | 4 ++++ src/Model.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1d0cde..fe59c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ - Updated [Rebing/GraphQL](https://github.com/rebing/graphql-laravel) Dependency from version 8.6 to 9.2 - Updated [Rcrowe/TwigBridge](https://github.com/rcrowe/TwigBridge) Dependency from version 0.14.1 to 0.14.3 +### Fixed + +- Handling of missing model attributes when Laravel is operating in strict mode + ## [1.3.2] - 2024-07-03 ### Fixed diff --git a/src/Model.php b/src/Model.php index 2603614..98deef3 100644 --- a/src/Model.php +++ b/src/Model.php @@ -8,4 +8,6 @@ class Model extends \Illuminate\Database\Eloquent\Model { protected $connection = 'coilpack'; + + protected static $modelsShouldPreventAccessingMissingAttributes = false; }