Examples of Global helpers (23)

Short information about global helpers

Helper files are usually used as global functions that don't belong to any particular class, and may be used anywhere in the Laravel project: in Controllers, Blade Views, or other classes.
To include such a helper file globally, typically it's added to the composer.json section "autoload" -> "files".
Important: if you describe some function as global, you should check if the same function name doesn't exist elsewhere in the project, with method function_exists().

Repository: monicahq/monica (Github)
★ 16962 Created: Jul 2017 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Helpers/CollectionHelper.php
- app/Providers/MacroServiceProvider.php
- app/Http/Controllers/Settings/GendersController.php
Repository: koel/koel (Github)
★ 13870 Created: Dec 2015 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Helpers.php
- resources/views/index.blade.php
Repository: bytefury/crater (Github)
★ 6212 Created: Nov 2019 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Space/helpers.php
- resources/views/app/pdf/invoice/partials/table.blade.php
Repository: akaunting/akaunting (Github)
★ 5417 Created: Sep 2017 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Utilities/helpers.php
- composer.json
- app/Http/Controllers/Auth/Login.php
Repository: pterodactyl/panel (Github)
★ 4072 Created: Dec 2016 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/helpers.php
- app/Repositories/Eloquent/EggRepository.php
Repository: area17/twill (Github)
★ 2858 Created: Jun 2018 Updated: Aug 2022 Laravel version: 8
Files in the example:
- src/Helpers/helpers.php
- src/Http/Controllers/Admin/SettingController.php
Repository: Bottelet/DaybydayCRM (Github)
★ 2016 Created: Jul 2016 Updated: Jul 2022 Laravel version: 7
Files in the example:
- app/helpers.php
- composer.json
- resources/views/auth/login.blade.php
- app/Http/Middleware/RedirectIfDemo.php
Repository: spatie/dashboard.spatie.be (Github)
★ 1919 Created: Jun 2017 Updated: May 2022 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/components/tiles/statistics.blade.php
- resources/views/dashboard.blade.php
- composer.json
Repository: HDInnovations/UNIT3D-Community-Edition (Github)
★ 1548 Created: Dec 2017 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Helpers/Helpers.php
- app/Http/Controllers/CommentController.php
Repository: guillaumebriday/laravel-blog (Github)
★ 1503 Created: Dec 2016 Updated: Jun 2022 Laravel version: 8
Files in the example:
- app/Helpers/date.php
- app/Models/User.php
- tests/Unit/PostTest.php
- composer.json
Repository: range-of-motion/budget (Github)
★ 781 Created: Jul 2017 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Helper.php
- app/Models/Budget.php
Repository: nasirkhan/laravel-starter (Github)
★ 618 Created: Oct 2017 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/helpers.php
- composer.json
- Modules/Tag/Resources/views/backend/tags/form.blade.php
- app/Http/Controllers/Backend/RolesController.php
Repository: officelifehq/officelife (Github)
★ 476 Created: Jan 2019 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Helpers/BirthdayHelper.php
- app/Http/ViewHelpers/Team/TeamShowViewHelper.php
Repository: agorakit/agorakit (Github)
★ 358 Created: May 2016 Updated: Jun 2022 Laravel version: 8
Files in the example:
- app/Helpers/Functions.php
- resources/views/files/create.blade.php
- app/Console/Commands/DeleteFiles.php
- composer.json
Repository: 4jean/lav_sms (Github)
★ 289 Created: Oct 2019 Updated: Apr 2022 Laravel version: 8
Files in the example:
- app/Helpers/Qs.php
- app/Http/Controllers/SupportTeam/UserController.php
Repository: jcergolj/laravellte (Github)
★ 202 Created: Jan 2020 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/helpers.php
- composer.json
- app/Http/Controllers/ConfirmedEmailController.php
Repository: LaraBug/larabug-app (Github)
★ 190 Created: Apr 2021 Updated: Jul 2022 Laravel version: 8
Files in the example:
- app/Utilities/helpers.php
- resources/views/frontend/partials/meta.blade.php
- composer.json
Repository: phpreel/phpreel (Github)
★ 116 Created: May 2021 Updated: Mar 2022 Laravel version: 8
Files in the example:
- app/Helpers/Categories/CategoriesHandler.php
- app/Http/Controllers/CategoriesController.php
Repository: familytree365/backend (Github)
★ 83 Created: May 2021 Updated: Aug 2021 Laravel version: 8
Files in the example:
- app/Helpers/helpers.php
- app/Http/Controllers/DnaController.php
- composer.json
Repository: spatie/laravel-beyond-crud.com (Github)
★ 51 Created: Jun 2020 Updated: Apr 2022 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/partials/footer.blade.php
- resources/views/front/home/sample-chapter.blade.php
Repository: hbakouane/admin-user-chatting (Github)
★ 44 Created: Nov 2020 Updated: Nov 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/livewire/show.blade.php
- composer.json
Repository: Wotuu/keystone.guru (Github)
★ 35 Created: Aug 2018 Updated: Aug 2022 Laravel version: 8
Files in the example:
- app/Helpers/CustomHelper.php
- resources/views/common/general/alert.blade.php
- app/Providers/HelperServiceProvider.php
- config/app.php
Repository: Ayenko4all/school-management-system-backend (Github)
★ 6 Created: Aug 2021 Updated: Nov 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- app/Http/Controllers/Auth/RegistrationController.php

Additional resources on global helpers: