use a utility function in blade code example
Example 1: how to share a helper globally laravel
php artisan make:provider HelperServiceProvider
Example 2: how to share a helper globally laravel
require_once app_path('Helpers/AnythingHelper.php');