| regardless of it's differences. | | | +---------------------------------------------------------------------------+ */ include 'SimpleGet.php'; # Get the row table columns $columns = Schema::getColumnListing($table); # Add su_hidden to hidden if the row is su if (Schema::hasColumn($table, 'su') and $row->su) { # Add the su_hidden fields to the hiden variable foreach ($su_hidden as $su_hid) { array_push($hidden, $su_hid); } } # Gets the fields available to edit / update $final_columns = []; foreach ($columns as $column) { $add = true; foreach ($hidden as $hide) { if ($column == $hide) { $add = false; } } if ($column == Laralum::allowEditingField() and !Laralum::loggedInUser()->su) { $add = false; } if ($add) { array_push($final_columns, $column); } } $fields = $final_columns;