File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,11 @@ public function show($slug, $id)
133133 {
134134 $ this ->checkSlug ($ slug , 'read ' );
135135 // Get the original values and not the altered values from model accessors
136- $ row = @$ this ->model ()::findOrFail ($ id , $ this ->filter_pivot ($ this ->columns ()))->getOriginal ();
136+ if (method_exists (@$ this ->model (), 'getRawOriginal ' )) {
137+ $ row = @$ this ->model ()::findOrFail ($ id , $ this ->filter_pivot ($ this ->columns ()))->getRawOriginal ();
138+ } else {
139+ $ row = @$ this ->model ()::findOrFail ($ id , $ this ->filter_pivot ($ this ->columns ()))->getOriginal ();
140+ }
137141 foreach ($ this ->columns () as $ columnId => $ column ) {
138142 // Output array columns with JSON_PRETTY_PRINT
139143 if ($ column ['type ' ] == 'array ' ) {
You can’t perform that action at this time.
0 commit comments