<?php
if (!function_exists('document')) {
function document($text = '') {
return $text;
}
}
Create a helpers.php file, let's assume for now it lives in app/Helpers/document.php
. You can put many helpers in one file (this is how Laravel does it) or you can split them up by name.