document.php

<?php

if (!function_exists('document')) {
    function document($text = '') {
        return $text;
    }
}

创建一个 helpers.php 文件,让我们假设它现在生活在 app/Helpers/document.php 中。你可以在一个文件中放置许多帮助程序(这是 Laravel 的工作方式),或者你可以按名称拆分它们。