use Railt\Guard\ModelUnguard; // Assume that we already have a database query result set ModelUnguard::of($result)->each(function($row) { echo $row['name']; });
use Railt\Guard\ModelUnguard; // Assume that we already have a JSON object $name = ModelUnguard::of($json)->get('name');In this code example, we are using the `ModelUnguard` package to safely retrieve a value from a JSON object. We do not need to check if the value exists because the package guarantees that it will never be null. Overall, Model unguard is a useful PHP package library for simplifying code and reducing errors by eliminating the need for null checks.